search mobile facets autocomplete spellcheck crawler rankings weights synonyms analytics engage api customize documentation install setup technology content domains user history info home business cart chart contact email activate analyticsalt analytics autocomplete cart contact content crawling custom documentation domains email engage faceted history info install mobile person querybuilder search setup spellcheck synonyms weights engage_search_term engage_related_content engage_next_results engage_personalized_results engage_recent_results success add arrow-down arrow-left arrow-right arrow-up caret-down caret-left caret-right caret-up check close content conversions-small conversions details edit grid help small-info error live magento minus move photo pin plus preview refresh search settings small-home stat subtract text trash unpin wordpress x alert case_deflection advanced-permissions keyword-detection predictive-ai sso

Pagination

Paginate search results.

q
required
The query used within your search.
engine_key
required
The Engine Key associated with your Engine. Found within your dashboard.
page
optional
Set the page, with respect to the total number of pages. Must be between 1 and 100. Defaults to 1.
per_page
optional
Set the number of results per page. Must be between 1 and 100. Defaults to 20.
Example - Fetching page 2, with 25 results per_page.
curl -XGET 'https://search-api.swiftype.com/api/v1/engines/bookstore/search.json'
  -H 'Content-Type: application/json' \
  -d '{
        "engine_key": "YOUR_ENGINE_KEY",
        "q": "brothers",
        "page": 2,
        "per_page": 25
      }'
Example Response
{
  "records":{
    "books":[...]
  },
  "info":{
    "books":{
      "query":"title",
      "current_page":2,
      "num_pages":4,
      "per_page":25,
      "total_result_count":76,
      "facets":{
      }
    }
  }
}

Errors

Note that a 200 response code will still return in the result of errors.

Look at the returning array for error information.

pageIf the parameter is not a JSON object.
If the per_page argument is not greater than or equal to 1 and less than 100.
If the page argument is not greater than or equal to 1 and less than 100.

Stuck? Looking for help? Contact support or check out the Site Search community forum!