Skip to main content
POST
/
1
/
clusters
/
mapping
/
search
curl
curl --request POST \
  --url https://algolia_application_id.algolia.net/1/clusters/mapping/search \
  --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 '{"query":"lorem","clusterName":"c11-test","page":0,"hitsPerPage":20}'
{
  "hits": [
    {
      "userID": "user1",
      "clusterName": "c11-test",
      "nbRecords": 3,
      "dataSize": 481,
      "objectID": "<string>",
      "_highlightResult": {
        "userID": {
          "value": "<em>George</em> <em>Clo</em>oney",
          "matchLevel": "none",
          "matchedWords": [
            "action"
          ],
          "fullyHighlighted": true
        },
        "clusterName": {
          "value": "<em>George</em> <em>Clo</em>oney",
          "matchLevel": "none",
          "matchedWords": [
            "action"
          ],
          "fullyHighlighted": true
        }
      }
    }
  ],
  "nbHits": 20,
  "page": 0,
  "hitsPerPage": 20,
  "updatedAt": "2023-07-04T12:49:15Z"
}
Requires Admin API key

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.

Body

application/json

OK

query
string
required
clusterName
string

Cluster name.

Example:

"c11-test"

page
integer
default:0

Page of search results to retrieve.

Required range: x >= 0
hitsPerPage
integer
default:20

Number of hits per page.

Required range: 1 <= x <= 1000

Response

OK

userIDs data.

hits
userHit · object[]
required

User objects that match the query.

nbHits
integer
required

Number of results (hits).

Example:

20

page
integer
default:0
required

Page of search results to retrieve.

Required range: x >= 0
hitsPerPage
integer
default:20
required

Maximum number of hits per page.

Algolia uses page and hitsPerPage to control how search results are displayed (paginated).

  • hitsPerPage: sets the number of search results (hits) displayed per page.
  • page: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is page=0, the second is page=1, and so on.

For example, to display 10 results per page starting from the third page, set hitsPerPage to 10 and page to 2.

Required range: 1 <= x <= 1000
updatedAt
string
required

Date and time when the object was updated, in RFC 3339 format.

Example:

"2023-07-04T12:49:15Z"

I