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

Search

Want to start with the concepts? Explore the Search guide.


Search, facet, filter, and curate your documents.

Change the default search behaviour using the Search Settings API or the Result Settings UI in the dashboard.

See the sidebar for further reference on deeper search parameters.

Before you send a query, it helps to know:

  1. Are there any Search Settings configured?
  2. Are there any Result Settings configured?

By default a search result will include all fields as raw, unlimited values. But you can choose to add character limits or return snippet field values.

The Search Settings API and the Result Settings feature can change these defaults.

You can also change it per API call with the Result Fields API.

It's good to experiment to see how the Result Field parameters impact your results.

After you perform some basic queries with result fields, check out the other API Reference documentation to get even deeper:

Search Queries

The search endpoint responds to GET and POST requests.

There are two different endpoints that you can query:

  1. search
  2. multi_search

They are similar, except multi_search allows up to 10 queries in a single API call.

query
required
A string or number used to find related documents. To match all documents, use an empty string "". You may also apply the following Lucene Query Syntax functions: double quoted strings, + and -, AND, OR, and NOT.
View Example
page
optional
Provides optional keys of size and current. Specifies the number of results per page and which page the API should return.
View Example

Performing a Single Search Query

POST /api/as/v1/engines/{ENGINE_NAME}/search
GET /api/as/v1/engines/{ENGINE_NAME}/search
Example - Performing a single query search.
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "everglade"
}'
Example Response
{
  "meta": {
    "warnings": [],
    "request_id": "2992570ab570b581ac6c457bddf68835",
    "page": {
      "total_pages": 1,
      "size": 10,
      "current": 1,
      "total_results": 3
    },
    "alerts": []
  },
  "results": [
    {
      "world_heritage_site": {
        "raw": "true"
      },
      "states": {
        "raw": [
          "Florida"
        ]
      },
      "location": {
        "raw": "25.32,-80.93"
      },
      "nps_link": {
        "raw": "https://www.nps.gov/ever/index.htm"
      },
      "acres": {
        "raw": 1508968.1
      },
      "date_established": {
        "raw": "1934-05-30T05:00:00+00:00"
      },
      "title": {
        "raw": "Everglades"
      },
      "visitors": {
        "raw": 930907
      },
      "square_km": {
        "raw": 6106.6
      },
      "description": {
        "raw": "The Everglades are the largest tropical wilderness in the United States. This mangrove and tropical rainforest ecosystem and marine estuary is home to 36 protected species, including the Florida panther, American crocodile, and West Indian manatee. Some areas have been drained and developed; restoration projects aim to restore the ecology."
      },
      "_meta": {
        "score": 1396363.1
      },
      "id": {
        "raw": "park_everglades"
      }
    },
    # ... More documents (truncated)
  ]
}

Example - Performing a single query search.
No Java example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "everglade"
}'
Example Response
No Java example available, showing cURL
{
  "meta": {
    "warnings": [],
    "request_id": "2992570ab570b581ac6c457bddf68835",
    "page": {
      "total_pages": 1,
      "size": 10,
      "current": 1,
      "total_results": 3
    },
    "alerts": []
  },
  "results": [
    {
      "world_heritage_site": {
        "raw": "true"
      },
      "states": {
        "raw": [
          "Florida"
        ]
      },
      "location": {
        "raw": "25.32,-80.93"
      },
      "nps_link": {
        "raw": "https://www.nps.gov/ever/index.htm"
      },
      "acres": {
        "raw": 1508968.1
      },
      "date_established": {
        "raw": "1934-05-30T05:00:00+00:00"
      },
      "title": {
        "raw": "Everglades"
      },
      "visitors": {
        "raw": 930907
      },
      "square_km": {
        "raw": 6106.6
      },
      "description": {
        "raw": "The Everglades are the largest tropical wilderness in the United States. This mangrove and tropical rainforest ecosystem and marine estuary is home to 36 protected species, including the Florida panther, American crocodile, and West Indian manatee. Some areas have been drained and developed; restoration projects aim to restore the ecology."
      },
      "_meta": {
        "score": 1396363.1
      },
      "id": {
        "raw": "park_everglades"
      }
    },
    # ... More documents (truncated)
  ]
}

Example - Performing a single query search.
No Node example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "everglade"
}'
Example Response
No Node example available, showing cURL
{
  "meta": {
    "warnings": [],
    "request_id": "2992570ab570b581ac6c457bddf68835",
    "page": {
      "total_pages": 1,
      "size": 10,
      "current": 1,
      "total_results": 3
    },
    "alerts": []
  },
  "results": [
    {
      "world_heritage_site": {
        "raw": "true"
      },
      "states": {
        "raw": [
          "Florida"
        ]
      },
      "location": {
        "raw": "25.32,-80.93"
      },
      "nps_link": {
        "raw": "https://www.nps.gov/ever/index.htm"
      },
      "acres": {
        "raw": 1508968.1
      },
      "date_established": {
        "raw": "1934-05-30T05:00:00+00:00"
      },
      "title": {
        "raw": "Everglades"
      },
      "visitors": {
        "raw": 930907
      },
      "square_km": {
        "raw": 6106.6
      },
      "description": {
        "raw": "The Everglades are the largest tropical wilderness in the United States. This mangrove and tropical rainforest ecosystem and marine estuary is home to 36 protected species, including the Florida panther, American crocodile, and West Indian manatee. Some areas have been drained and developed; restoration projects aim to restore the ecology."
      },
      "_meta": {
        "score": 1396363.1
      },
      "id": {
        "raw": "park_everglades"
      }
    },
    # ... More documents (truncated)
  ]
}

Example - Performing a single query search.
No Ruby example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "everglade"
}'
Example Response
No Ruby example available, showing cURL
{
  "meta": {
    "warnings": [],
    "request_id": "2992570ab570b581ac6c457bddf68835",
    "page": {
      "total_pages": 1,
      "size": 10,
      "current": 1,
      "total_results": 3
    },
    "alerts": []
  },
  "results": [
    {
      "world_heritage_site": {
        "raw": "true"
      },
      "states": {
        "raw": [
          "Florida"
        ]
      },
      "location": {
        "raw": "25.32,-80.93"
      },
      "nps_link": {
        "raw": "https://www.nps.gov/ever/index.htm"
      },
      "acres": {
        "raw": 1508968.1
      },
      "date_established": {
        "raw": "1934-05-30T05:00:00+00:00"
      },
      "title": {
        "raw": "Everglades"
      },
      "visitors": {
        "raw": 930907
      },
      "square_km": {
        "raw": 6106.6
      },
      "description": {
        "raw": "The Everglades are the largest tropical wilderness in the United States. This mangrove and tropical rainforest ecosystem and marine estuary is home to 36 protected species, including the Florida panther, American crocodile, and West Indian manatee. Some areas have been drained and developed; restoration projects aim to restore the ecology."
      },
      "_meta": {
        "score": 1396363.1
      },
      "id": {
        "raw": "park_everglades"
      }
    },
    # ... More documents (truncated)
  ]
}

Example - Performing a single query search.
No Python example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "everglade"
}'
Example Response
No Python example available, showing cURL
{
  "meta": {
    "warnings": [],
    "request_id": "2992570ab570b581ac6c457bddf68835",
    "page": {
      "total_pages": 1,
      "size": 10,
      "current": 1,
      "total_results": 3
    },
    "alerts": []
  },
  "results": [
    {
      "world_heritage_site": {
        "raw": "true"
      },
      "states": {
        "raw": [
          "Florida"
        ]
      },
      "location": {
        "raw": "25.32,-80.93"
      },
      "nps_link": {
        "raw": "https://www.nps.gov/ever/index.htm"
      },
      "acres": {
        "raw": 1508968.1
      },
      "date_established": {
        "raw": "1934-05-30T05:00:00+00:00"
      },
      "title": {
        "raw": "Everglades"
      },
      "visitors": {
        "raw": 930907
      },
      "square_km": {
        "raw": 6106.6
      },
      "description": {
        "raw": "The Everglades are the largest tropical wilderness in the United States. This mangrove and tropical rainforest ecosystem and marine estuary is home to 36 protected species, including the Florida panther, American crocodile, and West Indian manatee. Some areas have been drained and developed; restoration projects aim to restore the ecology."
      },
      "_meta": {
        "score": 1396363.1
      },
      "id": {
        "raw": "park_everglades"
      }
    },
    # ... More documents (truncated)
  ]
}

Example - Performing a single query search.
No Javascript example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "everglade"
}'
Example Response
No Javascript example available, showing cURL
{
  "meta": {
    "warnings": [],
    "request_id": "2992570ab570b581ac6c457bddf68835",
    "page": {
      "total_pages": 1,
      "size": 10,
      "current": 1,
      "total_results": 3
    },
    "alerts": []
  },
  "results": [
    {
      "world_heritage_site": {
        "raw": "true"
      },
      "states": {
        "raw": [
          "Florida"
        ]
      },
      "location": {
        "raw": "25.32,-80.93"
      },
      "nps_link": {
        "raw": "https://www.nps.gov/ever/index.htm"
      },
      "acres": {
        "raw": 1508968.1
      },
      "date_established": {
        "raw": "1934-05-30T05:00:00+00:00"
      },
      "title": {
        "raw": "Everglades"
      },
      "visitors": {
        "raw": 930907
      },
      "square_km": {
        "raw": 6106.6
      },
      "description": {
        "raw": "The Everglades are the largest tropical wilderness in the United States. This mangrove and tropical rainforest ecosystem and marine estuary is home to 36 protected species, including the Florida panther, American crocodile, and West Indian manatee. Some areas have been drained and developed; restoration projects aim to restore the ecology."
      },
      "_meta": {
        "score": 1396363.1
      },
      "id": {
        "raw": "park_everglades"
      }
    },
    # ... More documents (truncated)
  ]
}

Performing a Single Search Query with Lucene Query Syntax
Example - Performing a single query search using Lucene Query Syntax.
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "wyoming AND montana OR california NOT washington"
}'

Example - Performing a single query search using Lucene Query Syntax.
No Java example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "wyoming AND montana OR california NOT washington"
}'

Example - Performing a single query search using Lucene Query Syntax.
No Node example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "wyoming AND montana OR california NOT washington"
}'

Example - Performing a single query search using Lucene Query Syntax.
No Ruby example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "wyoming AND montana OR california NOT washington"
}'

Example - Performing a single query search using Lucene Query Syntax.
No Python example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "wyoming AND montana OR california NOT washington"
}'

Example - Performing a single query search using Lucene Query Syntax.
No Javascript example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "wyoming AND montana OR california NOT washington"
}'

Performing a Multiple Search Query

You can add multiple queries to a single search request.

Note that the multi_search queries have a fixed limit of 10 queries per request.

Note: Each query inside of a multi_search is counted as a separate analytic event. For example, issuing a multi_search with 4 queries will increase the analytics query count by 4.

POST /api/as/v1/engines/{ENGINE_NAME}/multi_search
GET /api/as/v1/engines/{ENGINE_NAME}/multi_search
Example - Performing a multiple query search.
curl -X POST 'http://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/multi_search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "queries": [
    {"query": "california"},
    {"query": "florida"}
  ]
}'
Example Response
[
  # First query result
  {
    "meta": {
      "alerts": [],
      "warnings": [],
      "page": {
        "current": 1,
        "size": 10,
        "total_pages": 1,
        "total_results": 4
      }
    },
    "results": [
      {
        "nps_link": {
          "raw": "https://www.nps.gov/yose/index.htm"
        },
        "id": {
          "raw": "park_yosemite"
        },
        "visitors": {
          "raw": 5028868
        },
        "title": {
          "raw": "Yosemite"
        },
        "date_established": {
          "raw": "1890-10-01T05:00:00+00:00"
        },
        "world_heritage_site": {
          "raw": "true"
        },
        "_meta": {
          "score": 7543316
        },
        "description": {
          "raw": "Yosemite features sheer granite cliffs, exceptionally tall waterfalls, and old-growth forests at a unique intersection of geology and hydrology. Half Dome and El Capitan rise from the park's centerpiece, the glacier-carved Yosemite Valley, and from its vertical walls drop Yosemite Falls, one of North America's tallest waterfalls at 2,425 feet (739 m) high. Three giant sequoia groves, along with a pristine wilderness in the heart of the Sierra Nevada, are home to a wide variety of rare plant and animal species."
        },
        "states": {
          "raw": [
            "California"
          ]
        },
        "acres": {
          "raw": 761747.5
        },
        "location": {
          "raw": "37.83,-119.5"
        },
        "square_km": {
          "raw": 3082.7
        }
      },
      # ... More documents (truncated)
    ]
  },
  # ... Second query result (truncated)
]

Example - Performing a multiple query search.
No Java example available, showing cURL
curl -X POST 'http://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/multi_search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "queries": [
    {"query": "california"},
    {"query": "florida"}
  ]
}'
Example Response
No Java example available, showing cURL
[
  # First query result
  {
    "meta": {
      "alerts": [],
      "warnings": [],
      "page": {
        "current": 1,
        "size": 10,
        "total_pages": 1,
        "total_results": 4
      }
    },
    "results": [
      {
        "nps_link": {
          "raw": "https://www.nps.gov/yose/index.htm"
        },
        "id": {
          "raw": "park_yosemite"
        },
        "visitors": {
          "raw": 5028868
        },
        "title": {
          "raw": "Yosemite"
        },
        "date_established": {
          "raw": "1890-10-01T05:00:00+00:00"
        },
        "world_heritage_site": {
          "raw": "true"
        },
        "_meta": {
          "score": 7543316
        },
        "description": {
          "raw": "Yosemite features sheer granite cliffs, exceptionally tall waterfalls, and old-growth forests at a unique intersection of geology and hydrology. Half Dome and El Capitan rise from the park's centerpiece, the glacier-carved Yosemite Valley, and from its vertical walls drop Yosemite Falls, one of North America's tallest waterfalls at 2,425 feet (739 m) high. Three giant sequoia groves, along with a pristine wilderness in the heart of the Sierra Nevada, are home to a wide variety of rare plant and animal species."
        },
        "states": {
          "raw": [
            "California"
          ]
        },
        "acres": {
          "raw": 761747.5
        },
        "location": {
          "raw": "37.83,-119.5"
        },
        "square_km": {
          "raw": 3082.7
        }
      },
      # ... More documents (truncated)
    ]
  },
  # ... Second query result (truncated)
]

Example - Performing a multiple query search.
No Node example available, showing cURL
curl -X POST 'http://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/multi_search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "queries": [
    {"query": "california"},
    {"query": "florida"}
  ]
}'
Example Response
No Node example available, showing cURL
[
  # First query result
  {
    "meta": {
      "alerts": [],
      "warnings": [],
      "page": {
        "current": 1,
        "size": 10,
        "total_pages": 1,
        "total_results": 4
      }
    },
    "results": [
      {
        "nps_link": {
          "raw": "https://www.nps.gov/yose/index.htm"
        },
        "id": {
          "raw": "park_yosemite"
        },
        "visitors": {
          "raw": 5028868
        },
        "title": {
          "raw": "Yosemite"
        },
        "date_established": {
          "raw": "1890-10-01T05:00:00+00:00"
        },
        "world_heritage_site": {
          "raw": "true"
        },
        "_meta": {
          "score": 7543316
        },
        "description": {
          "raw": "Yosemite features sheer granite cliffs, exceptionally tall waterfalls, and old-growth forests at a unique intersection of geology and hydrology. Half Dome and El Capitan rise from the park's centerpiece, the glacier-carved Yosemite Valley, and from its vertical walls drop Yosemite Falls, one of North America's tallest waterfalls at 2,425 feet (739 m) high. Three giant sequoia groves, along with a pristine wilderness in the heart of the Sierra Nevada, are home to a wide variety of rare plant and animal species."
        },
        "states": {
          "raw": [
            "California"
          ]
        },
        "acres": {
          "raw": 761747.5
        },
        "location": {
          "raw": "37.83,-119.5"
        },
        "square_km": {
          "raw": 3082.7
        }
      },
      # ... More documents (truncated)
    ]
  },
  # ... Second query result (truncated)
]

Example - Performing a multiple query search.
No Ruby example available, showing cURL
curl -X POST 'http://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/multi_search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "queries": [
    {"query": "california"},
    {"query": "florida"}
  ]
}'
Example Response
No Ruby example available, showing cURL
[
  # First query result
  {
    "meta": {
      "alerts": [],
      "warnings": [],
      "page": {
        "current": 1,
        "size": 10,
        "total_pages": 1,
        "total_results": 4
      }
    },
    "results": [
      {
        "nps_link": {
          "raw": "https://www.nps.gov/yose/index.htm"
        },
        "id": {
          "raw": "park_yosemite"
        },
        "visitors": {
          "raw": 5028868
        },
        "title": {
          "raw": "Yosemite"
        },
        "date_established": {
          "raw": "1890-10-01T05:00:00+00:00"
        },
        "world_heritage_site": {
          "raw": "true"
        },
        "_meta": {
          "score": 7543316
        },
        "description": {
          "raw": "Yosemite features sheer granite cliffs, exceptionally tall waterfalls, and old-growth forests at a unique intersection of geology and hydrology. Half Dome and El Capitan rise from the park's centerpiece, the glacier-carved Yosemite Valley, and from its vertical walls drop Yosemite Falls, one of North America's tallest waterfalls at 2,425 feet (739 m) high. Three giant sequoia groves, along with a pristine wilderness in the heart of the Sierra Nevada, are home to a wide variety of rare plant and animal species."
        },
        "states": {
          "raw": [
            "California"
          ]
        },
        "acres": {
          "raw": 761747.5
        },
        "location": {
          "raw": "37.83,-119.5"
        },
        "square_km": {
          "raw": 3082.7
        }
      },
      # ... More documents (truncated)
    ]
  },
  # ... Second query result (truncated)
]

Example - Performing a multiple query search.
No Python example available, showing cURL
curl -X POST 'http://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/multi_search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "queries": [
    {"query": "california"},
    {"query": "florida"}
  ]
}'
Example Response
No Python example available, showing cURL
[
  # First query result
  {
    "meta": {
      "alerts": [],
      "warnings": [],
      "page": {
        "current": 1,
        "size": 10,
        "total_pages": 1,
        "total_results": 4
      }
    },
    "results": [
      {
        "nps_link": {
          "raw": "https://www.nps.gov/yose/index.htm"
        },
        "id": {
          "raw": "park_yosemite"
        },
        "visitors": {
          "raw": 5028868
        },
        "title": {
          "raw": "Yosemite"
        },
        "date_established": {
          "raw": "1890-10-01T05:00:00+00:00"
        },
        "world_heritage_site": {
          "raw": "true"
        },
        "_meta": {
          "score": 7543316
        },
        "description": {
          "raw": "Yosemite features sheer granite cliffs, exceptionally tall waterfalls, and old-growth forests at a unique intersection of geology and hydrology. Half Dome and El Capitan rise from the park's centerpiece, the glacier-carved Yosemite Valley, and from its vertical walls drop Yosemite Falls, one of North America's tallest waterfalls at 2,425 feet (739 m) high. Three giant sequoia groves, along with a pristine wilderness in the heart of the Sierra Nevada, are home to a wide variety of rare plant and animal species."
        },
        "states": {
          "raw": [
            "California"
          ]
        },
        "acres": {
          "raw": 761747.5
        },
        "location": {
          "raw": "37.83,-119.5"
        },
        "square_km": {
          "raw": 3082.7
        }
      },
      # ... More documents (truncated)
    ]
  },
  # ... Second query result (truncated)
]

Example - Performing a multiple query search.
No Javascript example available, showing cURL
curl -X POST 'http://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/multi_search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "queries": [
    {"query": "california"},
    {"query": "florida"}
  ]
}'
Example Response
No Javascript example available, showing cURL
[
  # First query result
  {
    "meta": {
      "alerts": [],
      "warnings": [],
      "page": {
        "current": 1,
        "size": 10,
        "total_pages": 1,
        "total_results": 4
      }
    },
    "results": [
      {
        "nps_link": {
          "raw": "https://www.nps.gov/yose/index.htm"
        },
        "id": {
          "raw": "park_yosemite"
        },
        "visitors": {
          "raw": 5028868
        },
        "title": {
          "raw": "Yosemite"
        },
        "date_established": {
          "raw": "1890-10-01T05:00:00+00:00"
        },
        "world_heritage_site": {
          "raw": "true"
        },
        "_meta": {
          "score": 7543316
        },
        "description": {
          "raw": "Yosemite features sheer granite cliffs, exceptionally tall waterfalls, and old-growth forests at a unique intersection of geology and hydrology. Half Dome and El Capitan rise from the park's centerpiece, the glacier-carved Yosemite Valley, and from its vertical walls drop Yosemite Falls, one of North America's tallest waterfalls at 2,425 feet (739 m) high. Three giant sequoia groves, along with a pristine wilderness in the heart of the Sierra Nevada, are home to a wide variety of rare plant and animal species."
        },
        "states": {
          "raw": [
            "California"
          ]
        },
        "acres": {
          "raw": 761747.5
        },
        "location": {
          "raw": "37.83,-119.5"
        },
        "square_km": {
          "raw": 3082.7
        }
      },
      # ... More documents (truncated)
    ]
  },
  # ... Second query result (truncated)
]

Page

Allows for the adjustments to pagination.

size
optional
Number of results per page. Must be between 1 and 100; defaults to 20.
current
optional
Page number to return. Must be greater or equal to 1; defaults to 1.
Example - Getting the second page of results with a page size of 5. The API will return documents #5 through #10 by document score in the response.
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "park",
  "page": {
    "size": 5,
    "current": 2
  }
}'

Example - Getting the second page of results with a page size of 5. The API will return documents #5 through #10 by document score in the response.
No Java example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "park",
  "page": {
    "size": 5,
    "current": 2
  }
}'

Example - Getting the second page of results with a page size of 5. The API will return documents #5 through #10 by document score in the response.
No Node example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "park",
  "page": {
    "size": 5,
    "current": 2
  }
}'

Example - Getting the second page of results with a page size of 5. The API will return documents #5 through #10 by document score in the response.
No Ruby example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "park",
  "page": {
    "size": 5,
    "current": 2
  }
}'

Example - Getting the second page of results with a page size of 5. The API will return documents #5 through #10 by document score in the response.
No Python example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "park",
  "page": {
    "size": 5,
    "current": 2
  }
}'

Example - Getting the second page of results with a page size of 5. The API will return documents #5 through #10 by document score in the response.
No Javascript example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
  "query": "park",
  "page": {
    "size": 5,
    "current": 2
  }
}'

Common Errors

You will experience errors if...

queryThe parameter is missing from the request.
The parameter value is not a string or a number.
pageThe parameter is not a JSON object.
The size argument is not greater than or equal to 1 and less than or equal to 1000.
The page argument is not greater than or equal to 1 and less than or equal to 100.

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