pinned.events

Developer documentation

Pagination

Understand pagination fields returned by list endpoints, including page, limit, totalDocs, totalPages, hasNextPage, and hasPrevPage.

Use page and limit parameters with Pinned Events list endpoints. Understand paginated responses for events and channels.

How pagination works

Public list endpoints use page-based pagination. Send page and limit query parameters, then follow hasNextPage until the collection is exhausted.

curl "https://pinned.events/api/public/v1/events?page=1&limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response shape

{
  "docs": [
    {
      "id": 42,
      "name": "Valencia Live Music",
      "slug": "valencia-live-music"
    }
  ],
  "page": 1,
  "limit": 20,
  "totalDocs": 1,
  "totalPages": 1,
  "hasNextPage": false,
  "hasPrevPage": false
}
FieldMeaning
pageCurrent page number.
limitItems requested per page; list endpoints cap the effective limit at 100.
totalDocsTotal number of matching records when the endpoint returns a full pagination envelope.
totalPagesTotal number of pages when the endpoint returns a full pagination envelope.
hasNextPageWhether another page exists in full pagination envelopes.
hasPrevPageWhether a previous page exists in full pagination envelopes.

Endpoint differences

GET /api/public/v1/channels returns the full pagination envelope. GET /api/public/v1/events returns a minimal envelope with docs, totalDocs, limit, and page; derive additional pages from page, limit, and totalDocs.

Empty results

An empty page returns docs as an empty array. Treat empty docs as a valid response, not as an error.

Related pages

Core resources