POST
/
1
/
indexes
/
{indexName}
/
query

Authorizations

x-algolia-application-id
string
headerrequired

Your Algolia application ID.

x-algolia-api-key
string
headerrequired

Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.

Path Parameters

indexName
string
required

Name of the index on which to perform the operation.

Body

application/json

Search parameters as query string.

params
string
default:

Search parameters as a URL-encoded query string.

Response

200 - application/json
processingTimeMS
integer
required

Time the server took to process the request, in milliseconds.

page
integer
default: 0required

Page of search results to retrieve.

Required range: x > 0
nbHits
integer
required

Number of results (hits).

nbPages
integer
required

Number of pages of results.

hitsPerPage
integer
default: 20required

Number of hits per page.

Required range: 1 < x < 1000
hits
object[]
required

Search results (hits).

Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.

query
string
default: required

Search query.

params
string
required

URL-encoded string of all search parameters.

abTestID
integer

A/B test ID. This is only included in the response for indices that are part of an A/B test.

abTestVariantID
integer

Variant ID. This is only included in the response for indices that are part of an A/B test.

Required range: x > 1
aroundLatLng
string

Computed geographical location.

automaticRadius
string

Distance from a central coordinate provided by aroundLatLng.

exhaustive
object

Whether certain properties of the search response are calculated exhaustive (exact) or approximated.

exhaustiveFacetsCount
boolean
deprecated

See the facetsCount field of the exhaustive object in the response.

exhaustiveNbHits
boolean
deprecated

See the nbHits field of the exhaustive object in the response.

exhaustiveTypo
boolean
deprecated

See the typo field of the exhaustive object in the response.

facets
object

Facet counts.

facets_stats
object

Statistics for numerical facets.

index
string

Index name used for the query.

indexUsed
string

Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query.

message
string

Warnings about the query.

nbSortedHits
integer

Number of hits selected and sorted by the relevant sort algorithm.

parsedQuery
string

Post-normalization query string that will be searched.

processingTimingsMS
object

Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues.

queryAfterRemoval
string

Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set.

redirect
object

Redirect results to a URL, this this parameter is for internal use only.

renderingContent
object

Extra data that can be used in the search UI.

You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code.

serverTimeMS
integer

Time the server took to process the request, in milliseconds.

serverUsed
string

Host name of the server that processed the request.

userData
object

An object with custom data.

You can store up to 32kB as custom data.

queryID
string

Unique identifier for the query. This is used for click analytics.