Pagination

List endpoints return one page at a time. Ask for a page with skip (how many items to leave out from the start) and limit (how many to return, 20 by default). The response holds the page under a name that says what it is (maps, catalogs, contents, kiosks, sub_accounts) plus total, skip and limit, so you know when you have seen everything.

Endpoints that list a bounded set (a map's floor plans, a map's kiosks) return the whole set with no paging.

Parameters

  • Name
    skip
    Type
    integer
    Description
    Items to skip. Default 0.
  • Name
    limit
    Type
    integer
    Description
    Items per page. Default 20; the search endpoint caps it at 100.
  • Name
    sort
    Type
    string[]
    Description
    On catalogs and content: a field name, prefixed with - for descending. Repeat the parameter for several fields.

The second page of 10

curl "https://api.waygomaps.com/content/v1/exhibitors?skip=10&limit=10&sort=-updated_at" \
  -H "Waygo-API-Key: $WAYGO_API_KEY"

Response

{
  "contents": [
    { "content_id": "…", "data": { "Company": "Bolt Fasteners" } },
    { "content_id": "…", "data": { "Company": "Cobalt Coatings" } }
  ],
  "total": 301,
  "skip": 10,
  "limit": 10
}

Walk every page

skip, limit = 0, 100
while True:
    page = get(f"/content/v1/exhibitors?skip={skip}&limit={limit}")
    yield from page["contents"]
    skip += limit
    if skip >= page["total"]:
        break