Pexels icon

Pexels

Search and browse free photos and videos from Pexels | Documentation: https://dps.media/node-n8n-cho-pexels-tu-dong-hoa-tim-kiem-anh-va-video-mien-phi/

Collection → Get Collection Media

AI-generated

Summary

Retrieve media items from a Pexels collection.

Inputs

  • collectionId (required) — ID of the collection to fetch
  • returnAll — If true, return all items from the collection; otherwise the result is limited by limit
  • limit — Max number of media items to return from the collection (only applied when returnAll is false), default 50, min 1, max 5000
  • additionalFields — Optional filters and pagination, default {}. Sub-options: type (all|photos|videos), page (default 1), perPage (default 15, max 80)

Output shape

Array of media objects, each augmented with collection metadata (id, title, description, private). Pagination continues until all items are fetched, the limit is reached (when returnAll is false), or no further pages exist.

The node internally queries /v1/collections/${collectionId}, respects type filtering for photos/videos/both, and handles pagination via next_page links.

Examples

Example 1: Fetch up to 20 photos from collection XYZ123

collectionId: XYZ123, returnAll: false, limit: 20, additionalFields: { type: photos, perPage: 20 }

Discussion