---
title: List
slug: scaleserp/errorlogs-api/list
docTags: 
createdAt: 2024-08-03T18:00:34.682Z
---

# List Error Logs

You can List all of the Error Logs currently set up on your account by making making a  `HTTP GET` request to the  `/errorlogs` endpoint.

:::hint{type="info"}
**Error Logs API Rate Limit**
There is no charge for requests to the Error Logs API however the it is subject to a rate limit of 60 requests per minute. This limit includes requests made when accessing Error Logs via the [Scale SERP dashboard](https://app.scaleserp.com/errorlogs).

In the event of the rate limit being hit an  `HTTP 429`  [response code](https://docs.trajectdata.com/scaleserp/response-codes) will be returned.
:::

***

### Parameters

The following querystring (HTTP GET) parameters allow you to refine the results returned by the Error Logs List API.

| `Parameter`      | `Required` | `Description`                                                                                                                                      |
| ---------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `api_key`        | `required` | The API key for your account.                                                                                                                      |
| `search_term`    | `optional` | Limits the Error Logs returned to just those containing the `search_term` in their `parameters` property.                                          |
| `page`           | `optional` | Set the page number of Error Logs to return, defaults to `page=1` . 10 Error Logs are returned per page.                                           |
| `sort_by`        | `optional` | The sort order to apply to the results. Valid values are `date` (to sort by Error Log date) or `count` (to sort by Error Log count).               |
| `sort_direction` | `optional` | The sort direction to return results. Valid values are `descending` or `ascending` (the default). Use in conjunction with the `sort_by` parameter. |

### Example

<font color="#52c41a">`GET`</font>  `/errorlogs`

In the example below we List error logs on your account:

:::CodeblockTabs
HTTP

```HTTP
https://api.scaleserp.com/errorlogs?api_key=demo
```

```curl
$ curl "https://api.scaleserp.com/errorlogs?api_key=demo"
```

```nodejs
const axios = require('axios');
const params = {
  api_key: 'demo'
}

axios.get('https://api.scaleserp.com/errorlogs?api_key=demo')
  .then(response => {
    const apiResponse = response.data;

    console.log("Total Error Logs: ", apiResponse.results_count_total);

    apiResponse.logs.map((log, number) =>
      console.log((number + 1) + '. ' + log.id);
      
  }).catch(error => {
    console.error(error);
  });
```

```python
import requests
import json

params = {
  'api_key': 'demo'
}

api_result = requests.get('https://api.scaleserp.com/errorlogs', { params })

api_response = api_result.json()
```

```php
<?php
      
$queryString = http_build_query([
  'api_key' => 'demo',
]);

$ch = curl_init(sprintf('%s?%s', 'https://api.scaleserp.com/errorlogs', $queryString));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
# the following options are required if you're using an outdated OpenSSL version
# more details: https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 180);

$json = curl_exec($ch);
curl_close($ch);

$api_result = json_decode($json, true);

print_r($api_result);

echo "Total Error Logs: ", $api_result['results_count_total'], PHP_EOL;

?>
```
:::

Scale SERP responds with the following JSON showing error logs from your account:

```json
{
  "request_info": {
    "success": true
  },
  "logs": [
    {
      "id": "a566b6c63aa5a6b0a932827d45c4ecf195c491bc",
      "engine_url": "url opened by API",
      "api_url": "API request URL",
      "date": "2020-01-01T00:00:00.000Z",
      "count": 15,
      "parameters": {
        "param_name": "param_value"
      },
      "result": {
        "request_info": {
          "success": false,
          "message": "Unable to fulfil your request at this time, please retry. You have not been charged for this request."
        }
      }
    }
  ],
  "page": 1,
  "page_count_total": 1,
  "results_count": 1,
  "results_count_total": 1
}
```

***

Scale SERP returns the following properties in the List Error Logs response:

| `Property`            | `Type`   | `Description`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `request_info`        | `object` | An object containing the status of your request.<br />* `success`
* `boolean`
* True/false as to whether the request was successful.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `logs`                | `array`  | An array of Error Log objects. The Error Log object has the following properties:<br />* `id`
* `string`
* The unique ID of the Error Log.<br /><br />* `engine_url`
* `string`
* The URL that Scale SERP attempted to open on the host website to service this request. This can be useful to determine whether the host website is down or experiencing issues that would cause the Scale SERP request to fail.<br /><br />* `api_url`
* `string`
* The Scale SERP API request that caused the errored response. Note that, for security, your API Key is removed from the URL.<br /><br />* `date`
* `string`
* An ISO date/time stamp of the date of the most recent time this error was seen.<br /><br />* `count`
* `string`
* A count of the total number of times this error was seen.<br /><br />* `parameters`
* `string`
* A link to the website of the place result.<br /><br />* `thumbnail`
* `object`
* An object containing each of the API request parameters used in the request that generated the error.<br /><br />* `result`
* `object`
* An object containing the JSON response the API gave in response to the errored request. |
| `page`                | `number` | The current page of results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `page_count_total`    | `number` | The total number of pages of results that are available.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `results_count`       | `number` | The number of error log results on this page of results.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `results_count_total` | `number` | The total number of error logs on all pages.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

***

**Next Steps**
     [Account API](https://docs.trajectdata.com/scaleserp/account-api)
