Pagination

In the ShkolaFit API, you can manage paginated results when querying endpoints like the fetchSchoolSearch. Pagination parameters such as offset and limit allow you to control the number of results and navigate through pages. By default, you can fetch up to 25 results per page, but you can modify this by setting the limit parameter.

Schools Search Pagination

To query the fetchSchoolSearch endpoint with pagination, include the following query parameters:

  • offset: Specifies the starting point for results. For example, offset=0 will fetch the first page, offset=5 will fetch the next set of results starting from the 6th record.
  • limit: Limits the number of results per page. The maximum allowed value is 25.
  • Name
    query
    Type
    string
    Description

    Search query for schools (e.g., part of school name).

  • Name
    stateCode
    Type
    string
    Description

    Optional state filter to narrow the results.

  • Name
    offset
    Type
    integer
    Description

    Starting index of the results (default is 0).

  • Name
    limit
    Type
    integer
    Description

    Maximum number of results per page (default is 25, max is 25).

  • Name
    tokenID
    Type
    string
    Description

    Token for authentication.

curl -G "https://api.shkolafit.com/v1/fetchSchoolSearch" \
  -d "query=st p" \
  -d "stateCode=QLD" \
  -d "offset=0" \
  -d "limit=5" \
  -H "Authorization: Bearer {tokenID}"

Paginated response

{
  "apirequest": {
    "tid": "b9d32969-e8aa-42fd-8755-61f6a6ef8f8d",
    "trequestmade": "search_schools:st p",
    "ttimemade": "2025-01-22T13:41:06.689Z",
    "trequestcost": 1
  },
  "requestresult": {
    "schools": [
      {
        "schoolid": "468f5c70-1378-458e-8f2e-edc65acf453d",
        "schoolname": "St Paul's School",
        "stateprovince": "QLD",
        "city": "Woodridge",
        "image_url": "https://shkolafitschools.s3.ap-southeast-2.amazonaws.com/schoolLogos/29c7af57f68b45348a31419b74f5f02f_logo.jpg",
        "similarity_score": 0.25,
        "total_count": 29
      },
      {
        "schoolid": "f6818ef1-51a6-4b49-968e-db0e472dda36",
        "schoolname": "St Paul's School",
        "stateprovince": "QLD",
        "city": "Bald Hills",
        "image_url": "https://shkolafitschools.s3.ap-southeast-2.amazonaws.com/schoolLogos/9faf5cdb348d407da12d8e8c53a10408_logo.jpg",
        "similarity_score": 0.25,
        "total_count": 29
      }
      // Additional schools...
    ]
  }
}

total_count: The total number of results is included in each response, which helps you calculate how many pages are available.


Schools Search Next Page

To fetch the next page, update the offset parameter to skip the number of records already fetched. For example:

cURL

curl -G "https://api.shkolafit.com/v1/fetchSchoolSearch" \
  -d "query=st p" \
  -d "stateCode=QLD" \
  -d "offset=5" \ // Skip the first 5 records
  -d "limit=5" \
  -H "Authorization: Bearer {tokenID}"

This fetches the next 5 results starting from the 6th record.


Was this page helpful?