Skip to main content
POST
/
1
/
indexes
/
{indexName}
/
browse
curl
curl --request POST \
  --url https://algolia_application_id.algolia.net/1/indexes/ALGOLIA_INDEX_NAME/browse \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-algolia-api-key: ALGOLIA_API_KEY' \
  --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID' \
  --data '{"params":"hitsPerPage=2&getRankingInfo=1"}'
{
  "abTestID": 123,
  "abTestVariantID": 2,
  "aroundLatLng": "40.71,-74.01",
  "automaticRadius": "<string>",
  "exhaustive": {
    "facetsCount": true,
    "facetValues": true,
    "nbHits": true,
    "rulesMatch": true,
    "typo": true
  },
  "appliedRules": [
    {}
  ],
  "exhaustiveFacetsCount": true,
  "exhaustiveNbHits": true,
  "exhaustiveTypo": true,
  "facets": {
    "category": {
      "food": 1,
      "tech": 42
    }
  },
  "facets_stats": {},
  "index": "indexName",
  "indexUsed": "indexNameAlt",
  "message": "<string>",
  "nbSortedHits": 20,
  "parsedQuery": "george clo",
  "processingTimeMS": 20,
  "processingTimingsMS": {},
  "queryAfterRemoval": "<string>",
  "redirect": {
    "index": [
      {
        "source": "<string>",
        "dest": "<string>",
        "reason": "<string>",
        "succeed": true,
        "data": {
          "ruleObjectID": "<string>"
        }
      }
    ]
  },
  "renderingContent": {
    "facetOrdering": {
      "facets": {
        "order": [
          "<string>"
        ]
      },
      "values": {}
    },
    "redirect": {
      "url": "<string>"
    },
    "widgets": {
      "banners": [
        {
          "image": {
            "urls": [
              {
                "url": "<string>"
              }
            ],
            "title": "<string>"
          },
          "link": {
            "url": "<string>"
          }
        }
      ]
    }
  },
  "serverTimeMS": 20,
  "serverUsed": "c2-uk-3.algolia.net",
  "userData": "<any>",
  "queryID": "a00dbc80a8d13c4565a442e7e2dca80a",
  "_automaticInsights": true,
  "page": 0,
  "nbHits": 20,
  "nbPages": 1,
  "hitsPerPage": 20,
  "hits": [
    {
      "objectID": "test-record-123",
      "_highlightResult": {},
      "_snippetResult": {},
      "_rankingInfo": {
        "filters": 1,
        "firstMatchedWord": 1,
        "geoDistance": 1,
        "geoPrecision": 2,
        "matchedGeoLocation": {
          "lat": 123,
          "lng": 123,
          "distance": 123
        },
        "personalization": {
          "filtersScore": 123,
          "rankingScore": 123,
          "score": 123
        },
        "nbExactWords": 1,
        "nbTypos": 1,
        "promoted": true,
        "proximityDistance": 1,
        "userScore": 123,
        "words": 2,
        "promotedByReRanking": true
      },
      "_distinctSeqID": 123
    }
  ],
  "query": "",
  "params": "query=a&hitsPerPage=20",
  "cursor": "jMDY3M2MwM2QwMWUxMmQwYWI0ZTN"
}
Required ACL: browse

Authorizations

x-algolia-application-id
string
header
required

Your Algolia application ID.

x-algolia-api-key
string
header
required

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.

Example:

"ALGOLIA_INDEX_NAME"

Body

application/json
  • Search parameters as query string.
  • Option 2

Search parameters as query string.

params
string
default:""

Search parameters as a URL-encoded query string.

Example:

"hitsPerPage=2&getRankingInfo=1"

Response

OK

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.

Example:

"query=a&hitsPerPage=20"

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.

Example:

"40.71,-74.01"

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.

appliedRules
appliedRules · object[]

Rules applied to the query.

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.

Example:
{ "category": { "food": 1, "tech": 42 } }
facets_stats
object

Statistics for numerical facets.

index
string

Index name used for the query.

Example:

"indexName"

indexUsed
string

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

Example:

"indexNameAlt"

message
string

Warnings about the query.

nbSortedHits
integer

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

Example:

20

parsedQuery
string

Post-normalization query string that will be searched.

Example:

"george clo"

processingTimeMS
integer

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

Example:

20

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.

Example:

20

serverUsed
string

Host name of the server that processed the request.

Example:

"c2-uk-3.algolia.net"

userData
any

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.

Example:

"a00dbc80a8d13c4565a442e7e2dca80a"

_automaticInsights
boolean

Whether automatic events collection is enabled for the application.

page
integer
default:0

Page of search results to retrieve.

Required range: x >= 0
nbHits
integer

Number of results (hits).

Example:

20

nbPages
integer

Number of pages of results.

Example:

1

hitsPerPage
integer
default:20

Number of hits per page.

Required range: 1 <= x <= 1000
cursor
string

Cursor to get the next page of the response.

The parameter must match the value returned in the response of a previous request. The last page of the response does not return a cursor attribute.

Example:

"jMDY3M2MwM2QwMWUxMmQwYWI0ZTN"

I