Pagination and filtering

Page through lists with cursors and select items with filters.

Pagination

List endpoints use cursor pagination with the cursor and limit query parameters. limit defaults to 20, with a maximum of 100.

Each response contains:

  • data: the items of this page;
  • has_more: whether more items follow;
  • next_cursor: an opaque token for the next page, null on the last page.

To read a whole collection, repeat the request with cursor set to the previous response's next_cursor until has_more is false:

curl "https://api.lingohub.com/v2/projects?limit=100" \
  -H "Authorization: Bearer $LINGOHUB_API_KEY"

curl "https://api.lingohub.com/v2/projects?limit=100&cursor=$NEXT_CURSOR" \
  -H "Authorization: Bearer $LINGOHUB_API_KEY"

Keep every other query parameter the same while you follow a cursor. A cursor belongs to the collection, the filter and the sort order it was created with. If you change any of them, the request fails with 400 invalid_cursor.

Lists don't return a total count. Items created or deleted before the cursor position aren't revisited during an iteration.

Filtering

Lists accept a filter query parameter: URL-encoded JSON that selects items (where) and orders them (sort).

  • where holds exactly one _and or _or with an array of clauses.
  • A clause is either a nested _and/_or, or one field with exactly one operator.
  • Fields are named <object_type>[<field>] after the list's items, for example project[name], and compare the values the responses show.
  • sort lists fields in order, each prefixed with + (ascending) or - (descending).

Each list documents its fields, their operators and values, and which fields can sort, in its filter parameter and its filter schema (for example ProjectFilter) in the API reference.

Example

Projects whose name contains "app" and that are either of type STANDARD_JSON or created this year, newest first:

{
  "where": {
    "_and": [
      { "project[name]": { "_icontains": "app" } },
      {
        "_or": [
          { "project[type]": { "_eq": "STANDARD_JSON" } },
          { "project[created_at]": { "_gte": "2026-01-01T00:00:00Z" } }
        ]
      }
    ]
  },
  "sort": ["-project[created_at]"]
}

With curl, let it URL-encode the filter for you:

curl -G "https://api.lingohub.com/v2/projects" \
  -H "Authorization: Bearer $LINGOHUB_API_KEY" \
  --data-urlencode 'filter={"where":{"_and":[{"project[name]":{"_icontains":"app"}}]},"sort":["-project[created_at]"]}'

Invalid filters

A field, operator or value the list doesn't support returns 400 invalid_filter. The error points to the exact place in the filter and names what is supported there:

{
  "status": 400,
  "code": "invalid_filter",
  "errors": [
    {
      "parameter": "filter",
      "pointer": "#/where/_and/1/_or/0/project[type]/_eq",
      "code": "enum",
      "detail": "'JSON' is not a value of 'project[type]'. Values: ANDROID_XML, IOS_STRINGS, ..."
    }
  ]
}

Did this page help you?