SocialKit
APIGet Started

Pagination

Which SocialKit API lists come in pages, the page size parameters they accept, and how to walk every page.

Some list endpoints return results in pages; others return everything in one response.

Paged lists

EndpointPage size parameterDefaultMost
List postslimit50100
List media fileslimit50100
List mentionsper_page25100

All three take page (default 1). A larger page size is cut to 100 without an error. Use the parameter named in the table: posts and media ignore per_page, mentions ignore limit.

curl -X GET 'https://app.socialk.it/core/api/<workspaceUuid>/posts?limit=25&page=2' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <personal-key>'

A paged response wraps the records in data and adds links and meta:

{
  "data": [],
  "links": {
    "first": "https://app.socialk.it/core/api/<workspaceUuid>/posts?page=1",
    "last": "https://app.socialk.it/core/api/<workspaceUuid>/posts?page=4",
    "prev": null,
    "next": "https://app.socialk.it/core/api/<workspaceUuid>/posts?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 4,
    "links": [
      { "url": null, "label": "&laquo; Previous", "active": false },
      { "url": "https://app.socialk.it/core/api/<workspaceUuid>/posts?page=1", "label": "1", "active": true },
      { "url": "https://app.socialk.it/core/api/<workspaceUuid>/posts?page=2", "label": "Next &raquo;", "active": false }
    ],
    "path": "https://app.socialk.it/core/api/<workspaceUuid>/posts",
    "per_page": 50,
    "to": 50,
    "total": 187
  }
}

To read every page, follow links.next until it is null.

Posts and media come newest first, with ties broken by ID, so the order is stable. Records created while you walk the pages still move the others along, so a sync of a busy workspace should skip records whose uuid it has already seen.

Lists without pages

List accounts, List tags and List your workspaces return the whole list in data, with no links or meta. They ignore page and limit.

{
  "data": []
}

On this page