Skip to main content

Search API (0.1.0)

Download OpenAPI specification:Download

API powering the Search feature of Algolia.

Authentication

appId

Security Scheme Type API Key
Header parameter name: X-Algolia-Application-Id

apiKey

Security Scheme Type API Key
Header parameter name: X-Algolia-API-Key

algoliasearch-lite

Send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Authorizations:
path Parameters
path
required
string
Example: /keys

The path of the API endpoint to target, anything after the /1 needs to be specified.

query Parameters
object

Query parameters to be applied to the current query.

Request Body schema: application/json

The parameters to send with the custom request.

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Get search results.

Get search results.

Authorizations:
path Parameters
indexName
required
string
Example: myIndexName

The index in which to perform the request.

Request Body schema: application/json
One of
params
string (paramsAsString)
Default: ""

Search parameters as URL-encoded query string.

Responses

Request samples

Content type
application/json
Example
{
  • "params": ""
}

Response samples

Content type
application/json
{
  • "abTestID": 0,
  • "abTestVariantID": 0,
  • "aroundLatLng": "string",
  • "automaticRadius": "string",
  • "exhaustiveFacetsCount": true,
  • "exhaustiveNbHits": true,
  • "exhaustiveTypo": true,
  • "facets": {
    },
  • "facets_stats": {
    },
  • "hitsPerPage": 20,
  • "index": "indexName",
  • "indexUsed": "indexNameAlt",
  • "message": "string",
  • "nbHits": 20,
  • "nbPages": 1,
  • "nbSortedHits": 20,
  • "page": 0,
  • "params": "query=a&hitsPerPage=20",
  • "parsedQuery": "string",
  • "processingTimeMS": 20,
  • "query": "",
  • "queryAfterRemoval": "string",
  • "serverUsed": "string",
  • "userData": { },
  • "hits": [
    ]
}

Get search results for the given requests.

Get search results for the given requests.

Authorizations:
Request Body schema: application/json

The multipleQueries requests and strategy.

required
Array of objects (multipleQueries) [ items ]
strategy
string (multipleQueriesStrategy)
Enum: "none" "stopIfEnoughMatches"

Responses

Request samples

Content type
application/json
{
  • "requests": [
    ],
  • "strategy": "none"
}

Response samples

Content type
application/json
{
  • "results": [
    ]
}

Search for values of a given facet

Search for values of a given facet, optionally restricting the returned values to those contained in objects matching other search criteria.

Authorizations:
path Parameters
indexName
required
string
Example: myIndexName

The index in which to perform the request.

facetName
required
string

The facet name.

Request Body schema: application/json
params
string (paramsAsString)
Default: ""

Search parameters as URL-encoded query string.

facetQuery
string
Default: ""

Text to search inside the facet's values.

maxFacetHits
integer (maxFacetHits) <= 100
Default: 10

Maximum number of facet hits to return during a search for facet values. For performance reasons, the maximum allowed number of returned values is 100.

Responses

Request samples

Content type
application/json
{
  • "params": "",
  • "facetQuery": "",
  • "maxFacetHits": 10
}

Response samples

Content type
application/json
{
  • "facetHits": [
    ]
}