Management APIs
Error Logs API

List

6min
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 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 get get /errorlogs in the example below we list error logs on your account http https //api scaleserp com/errorlogs?api key=demo$ curl "https //api scaleserp com/errorlogs?api key=demo"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); });import requests import json params = { 'api key' 'demo' } api result = requests get('https //api scaleserp com/errorlogs', { params }) api response = api result json()\<?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 { "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 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 id string the unique id of the error log 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 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 date string an iso date/time stamp of the date of the most recent time this error was seen count string a count of the total number of times this error was seen parameters string a link to the website of the place result thumbnail object an object containing each of the api request parameters used in the request that generated the error 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