Last reports
The SerpstatReportsProcedure.getLatestReports returns information about generated reports and links to download them. The data corresponds to the "Last reports".
Request parameters | |||||
Parameter | Description | Type | Optional | Default value | Value options |
id | A request id: the response contains the same id. | int/string | no | Text or number value | |
method | API method name | string | no | SerpstatReportsProcedure.getLatestReports | |
params | The object with parameters {...}, it lists all the following parameters and arrays [...] | yes |
| ||
filters | Filter conditions | array | yes |
| "query" – filter by query content in the report name. Example: "query": "some string value" |
sort | Sort by data | array | yes | "date": "desc" | "date" – sorting by data, |
page | Page number in response | int | yes | 1 | "page": 1 (any number value) |
size | Number of results per page in response | int | yes | 20 | "size": 10 (any number value) |
Response parameters | |
Parameter | Description |
id | Response id corresponds the request id |
result | Contains the answer |
data | Array with data |
format | Report format. Possible values: csv – comma-separated values file format, csv_cp1251 – comma-separated values file format with cp1251 coding, gdrive – file stored on Google Drive, kv_xls – exporting format for a list of validation errors in clustering Serpstat, corresponds to xls format, mgxlsx_mfiles – Serpstat audit export format, corresponds to xlsx format, mgxlsx – Serpstat audit export format, corresponds to xlsx format, pdf – Portable Document Format, pupetter_pdf – file format that generates a pdf from an html page, xlsx – XML-format of a Microsoft Excel file, xls – format of a Microsoft Excel file. |
status | Status of report -1 – generation error 0 – generation in process 1 – generated, but not downloaded 2 – generated and downloaded 3 – limits exceeded 4 – removed by user |
created | Date of report generation |
query | Name of report |
request | Name of the request for report generation. Example: Audit_Dashboard, backlink_top_pages etc. |
se | Search database |
file | Link to download the report |
summary_info | Object with data |
left_lines | API credits remaining |
total_reports | Total number of reports |
sort | Applied sorting |
page | Page number in response |
size | Number of results per page in response |
Credits for this method are not deducted.
{
"id": 1,
"method": "SerpstatReportsProcedure.getLatestReports",
"params": {
"filters": {"query": ""},
"sort": {"status": "desc"},
"page": 1,
"size": 20
}
}
{
"id": "1",
"result": {
"data": [
{
"format": "csv",
"status": "1",
"created": "2022-11-16 06:44:28",
"query": "premierleague.com",
"request": "positions",
"se": "Google.UK",
"file": "https://docs.serpstat.com/files/reports/5/positions_premierleague_com-2022-11-16_06-44-32_Google_UK.63746ab0a8707.csv"
},
{
"format": "csv",
"status": "1",
"created": "2022-11-16 06:46:52",
"query": "manutd.com",
"request": "urls_with_shares",
"se": "Google.UK",
"file": "https://docs.serpstat.com/files/reports/52/urls_with_shares_manutd_com-2022-11-16_06-46-53_Google_UK.63746b3d25c83.csv"
},
{
"format": "mgxlsx",
"status": "1",
"created": "2022-11-17 01:30:46",
"query": "teepublic.com-2022-11-17-00-03_report",
"request": "Audit_Dashboard",
"se": "",
"file": "https://docs.serpstat.com/files/reports/81/Audit_Dashboard_teepublic_com-2022-11-17-00-03_report-2022-11-17_01-30-47_Google_UA.637572a76043a.xlsx"
},
{
"format": "gdrive",
"status": "1",
"created": "2022-11-21 06:56:23",
"query": "twitter.com",
"request": "positions",
"se": "Google.UA",
"file": "https://drive.google.com/open?id=1e-XxOPi9qkd2HOXbvF4jwtvNndrdO9gVDJ5afmBg02s"
}
],
"summary_info": {
"left_lines": 1000000,
"total_reports": 4,
"sort": {
"status": "desc"
},
"page": 1,
"size": 20
}
}
}