curl
curl --request GET \
--url 'https://algolia_application_id.algolia.net/1/logs?offset=0&length=10&indexName=products&type=all' \
--header 'accept: application/json' \
--header 'x-algolia-api-key: ALGOLIA_API_KEY' \
--header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID'// Initialize the client
var client = new SearchClient(new SearchConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY"));
// Call the API
var response = await client.GetLogsAsync();
// print the response
Console.WriteLine(response);// Initialize the client
final client =
SearchClient(appId: 'ALGOLIA_APPLICATION_ID', apiKey: 'ALGOLIA_API_KEY');
// Call the API
final response = await client.getLogs();
// print the response
print(response);// Initialize the client
client, err := search.NewClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")
if err != nil {
// The client can fail to initialize if you pass an invalid parameter.
panic(err)
}
// Call the API
response, err := client.GetLogs(client.NewApiGetLogsRequest())
if err != nil {
// handle the eventual error
panic(err)
}
// print the response
print(response)// Initialize the client
SearchClient client = new SearchClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY");
// Call the API
GetLogsResponse response = client.getLogs();
// print the response
System.out.println(response);// Initialize the client
const client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY');
// Call the API
const response = await client.getLogs();
// print the response
console.log(response);// Initialize the client
val client = SearchClient(appId = "ALGOLIA_APPLICATION_ID", apiKey = "ALGOLIA_API_KEY")
// Call the API
var response = client.getLogs()
// print the response
println(response)// Initialize the client
$client = SearchClient::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY');
// Call the API
$response = $client->getLogs();
// print the response
var_dump($response);# Initialize the client
# In an asynchronous context, you can use SearchClient instead, which exposes the exact same methods.
client = SearchClientSync("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")
# Call the API
response = client.get_logs()
# print the response
print(response)# Initialize the client
client = Algolia::SearchClient.create("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")
# Call the API
response = client.get_logs
# print the response
puts(response)// Initialize the client
val client = SearchClient(appId = "ALGOLIA_APPLICATION_ID", apiKey = "ALGOLIA_API_KEY")
// Call the API
val response = Await.result(
client.getLogs(
),
Duration(100, "sec")
)
// print the response
println(response)// Initialize the client
let client = try SearchClient(appID: "ALGOLIA_APPLICATION_ID", apiKey: "ALGOLIA_API_KEY")
// Call the API
let response = try await client.getLogs()
// print the response
print(response){
"logs": [
{
"answer": "'n{\\n \"results\": [\\n {\\n \"hits\": [\\n {\\n \"name\": \"Amazon - Fire TV Stick\",\\n \"description\": \"Amazon Fire TV Stick connects to your TV's HDMI port. Just grab and go to enjoy Netflix, Prime Instant Video, Hulu Plus, YouTube.com, music, and much more.\",\\n \"brand\": \"Amazon\",\\n \"categories\": [\\n \"TV & Home Theater\",\\n \"Streaming Media Players\"\\n ],\\n \"hierarchicalCategories\": {\\n \"lvl0\": \"TV & Home Theater\",\\n \"lvl1\": \"TV & Home Theater > Streaming Media Players\"\\n },\\n \"type\": \"Streaming media player\",\\n \"price\": 39.99,\\n \"price_range\": \"1 }\\n ]\\n }\\n ]\\n}'\n",
"answer_code": "200",
"ip": "93.184.216.34",
"method": "GET",
"processing_time_ms": "2",
"query_body": "{\\n \\\"requests\\\": [\\n {\\n \\\"indexName\\\": \\\"best_buy\\\",\\n \\\"params\\\": \\\"query=&hitsPerPage=10&page=0&attributesToRetrieve=*&highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&getRankingInfo=1&facets=%5B%22brand%22%2C%22categories%22%2C%22free_shipping%22%2C%22type%22%5D&tagFilters=\\\"\\n }\\n ]\\n}\\n",
"query_headers": "User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5\\nHost: example.com\\nAccept: */*\\nContent-Type: application/json; charset=utf-8\\nX-Algolia-API-Key: 20f***************************\\nX-Algolia-Application-Id: MyApplicationID\\n",
"sha1": "26c53bd7e38ca71f4741b71994cd94a600b7ac68",
"timestamp": "2023-03-08T12:34:56Z",
"url": "/1/indexes",
"index": "products",
"inner_queries": [
{
"index_name": "products",
"query_id": "96f59a3145dd9bd8963dc223950507c8",
"user_token": "93.189.166.128"
}
],
"nb_api_calls": "1",
"query_nb_hits": "1",
"query_params": "query=georgia&attributesToRetrieve=name,city,country"
}
]
}{
"message": "Invalid Application-Id or API-Key"
}{
"message": "Invalid Application-Id or API-Key"
}{
"message": "Invalid Application-Id or API-Key"
}{
"message": "Invalid Application-Id or API-Key"
}Other
Retrieve log entries
The request must be authenticated by an API key with the logs ACL.
GET
/
1
/
logs
curl
curl --request GET \
--url 'https://algolia_application_id.algolia.net/1/logs?offset=0&length=10&indexName=products&type=all' \
--header 'accept: application/json' \
--header 'x-algolia-api-key: ALGOLIA_API_KEY' \
--header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID'// Initialize the client
var client = new SearchClient(new SearchConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY"));
// Call the API
var response = await client.GetLogsAsync();
// print the response
Console.WriteLine(response);// Initialize the client
final client =
SearchClient(appId: 'ALGOLIA_APPLICATION_ID', apiKey: 'ALGOLIA_API_KEY');
// Call the API
final response = await client.getLogs();
// print the response
print(response);// Initialize the client
client, err := search.NewClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")
if err != nil {
// The client can fail to initialize if you pass an invalid parameter.
panic(err)
}
// Call the API
response, err := client.GetLogs(client.NewApiGetLogsRequest())
if err != nil {
// handle the eventual error
panic(err)
}
// print the response
print(response)// Initialize the client
SearchClient client = new SearchClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY");
// Call the API
GetLogsResponse response = client.getLogs();
// print the response
System.out.println(response);// Initialize the client
const client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY');
// Call the API
const response = await client.getLogs();
// print the response
console.log(response);// Initialize the client
val client = SearchClient(appId = "ALGOLIA_APPLICATION_ID", apiKey = "ALGOLIA_API_KEY")
// Call the API
var response = client.getLogs()
// print the response
println(response)// Initialize the client
$client = SearchClient::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY');
// Call the API
$response = $client->getLogs();
// print the response
var_dump($response);# Initialize the client
# In an asynchronous context, you can use SearchClient instead, which exposes the exact same methods.
client = SearchClientSync("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")
# Call the API
response = client.get_logs()
# print the response
print(response)# Initialize the client
client = Algolia::SearchClient.create("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")
# Call the API
response = client.get_logs
# print the response
puts(response)// Initialize the client
val client = SearchClient(appId = "ALGOLIA_APPLICATION_ID", apiKey = "ALGOLIA_API_KEY")
// Call the API
val response = Await.result(
client.getLogs(
),
Duration(100, "sec")
)
// print the response
println(response)// Initialize the client
let client = try SearchClient(appID: "ALGOLIA_APPLICATION_ID", apiKey: "ALGOLIA_API_KEY")
// Call the API
let response = try await client.getLogs()
// print the response
print(response){
"logs": [
{
"answer": "'n{\\n \"results\": [\\n {\\n \"hits\": [\\n {\\n \"name\": \"Amazon - Fire TV Stick\",\\n \"description\": \"Amazon Fire TV Stick connects to your TV's HDMI port. Just grab and go to enjoy Netflix, Prime Instant Video, Hulu Plus, YouTube.com, music, and much more.\",\\n \"brand\": \"Amazon\",\\n \"categories\": [\\n \"TV & Home Theater\",\\n \"Streaming Media Players\"\\n ],\\n \"hierarchicalCategories\": {\\n \"lvl0\": \"TV & Home Theater\",\\n \"lvl1\": \"TV & Home Theater > Streaming Media Players\"\\n },\\n \"type\": \"Streaming media player\",\\n \"price\": 39.99,\\n \"price_range\": \"1 }\\n ]\\n }\\n ]\\n}'\n",
"answer_code": "200",
"ip": "93.184.216.34",
"method": "GET",
"processing_time_ms": "2",
"query_body": "{\\n \\\"requests\\\": [\\n {\\n \\\"indexName\\\": \\\"best_buy\\\",\\n \\\"params\\\": \\\"query=&hitsPerPage=10&page=0&attributesToRetrieve=*&highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&getRankingInfo=1&facets=%5B%22brand%22%2C%22categories%22%2C%22free_shipping%22%2C%22type%22%5D&tagFilters=\\\"\\n }\\n ]\\n}\\n",
"query_headers": "User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5\\nHost: example.com\\nAccept: */*\\nContent-Type: application/json; charset=utf-8\\nX-Algolia-API-Key: 20f***************************\\nX-Algolia-Application-Id: MyApplicationID\\n",
"sha1": "26c53bd7e38ca71f4741b71994cd94a600b7ac68",
"timestamp": "2023-03-08T12:34:56Z",
"url": "/1/indexes",
"index": "products",
"inner_queries": [
{
"index_name": "products",
"query_id": "96f59a3145dd9bd8963dc223950507c8",
"user_token": "93.189.166.128"
}
],
"nb_api_calls": "1",
"query_nb_hits": "1",
"query_params": "query=georgia&attributesToRetrieve=name,city,country"
}
]
}{
"message": "Invalid Application-Id or API-Key"
}{
"message": "Invalid Application-Id or API-Key"
}{
"message": "Invalid Application-Id or API-Key"
}{
"message": "Invalid Application-Id or API-Key"
}- Logs are held for the last seven days.
- Up to 1,000 API requests per server are logged.
- This request counts towards your operations quota but doesnβt appear in the logs itself.
logsAuthorizations
Your Algolia application ID.
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.
Query Parameters
Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
Maximum number of entries to retrieve.
Required range:
x <= 1000First log entry to retrieve. The most recent entries are listed first.
Type of log entries to retrieve. By default, all log entries are retrieved.
Available options:
all, query, build, error Response
OK
Show child attributes
Show child attributes
Last modified on March 23, 2026
Was this page helpful?
βI