Reports
get_report
Get report ยท Read-only, idempotent
Read one existing report's state, parameters and file metadata.
Poll unfinished reports at least 5 seconds apart. When state is ready, read a JSON or JSONL report's keywords with get_report_records; give the user get_report_download_link for a CSV report or when they want the file.
Cost and limits: Costs no credits.
Input
| Name | Type | Required | Description |
|---|---|---|---|
report_id | string (uuid) | Required | A report ID from list_reports data.reports[].id or request_report data.id. Pattern in the full JSON Schema below. |
Output
Read this object from the result's structuredContent. The result's content carries a text version for the model, which is not always the same JSON.
One accepted report and its result. report_type says which type it is and which parameters it has. failure_code is machine-readable and failure_message says what to do next; see Get a report for every code.
data is one of 2 shapes.
KeywordsForKeywordReport
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Required | |
report_type | "keywords_for_keyword.1" | Required | |
parameters | object | Required | The request's parameters as accepted: normalised, with the defaults of interval, include_periods and format filled in. |
state | string | Required | queued and processing are unfinished; poll at least 5 seconds apart. ready has a file. failed and expired are terminal. Decide failure from state, not failure_code. One of queued, processing, ready, failed, expired. |
failure_code | string | null | Required | Stable terminal failure code. See Get a report for recovery. |
failure_message | string | null | Required | Plain-language explanation and next step for a failed report. Null in every other state. |
created_at | string (date-time) | Required | When the request was accepted. |
started_at | string | null (date-time) | Required | |
completed_at | string | null (date-time) | Required | |
result | object | null | Required | Null until successful completion. Ready and expired reports keep this metadata; a report with no matching keywords has row_count 0. Download links come only from the download endpoint. |
data.parameters
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | Required | The keyword to research. The report covers it and every keyword that contains it, as the app's default Keyword Spy search finds them. For data on an exact list of keywords use GET /v0/keywords. Surrounding and repeated spaces are removed and it is stored in lower case. Minimum length 1. Maximum length 200. |
marketplace | string | Required | The marketplace to research. Case-insensitive; stored in upper case. One of US, CA, MX, UK, DE, FR, IT, ES, AU. |
interval | "weekly" | "monthly" | Required | Whether clicks and sales are weekly or monthly averages. weekly returns 403 weekly_interval_not_allowed on plans without weekly data. Default "monthly". |
start_date | string (date) | Required | First week or month of the range, YYYY-MM-DD: the first day of a month, or the Sunday that starts a week. Any other day returns 400 invalid_date with error.suggested_start_date. |
end_date | string (date) | Required | Last week or month of the range, YYYY-MM-DD, on or after start_date. The range covers at most 12 weeks or months and must lie within the research data available on your plan. |
include_periods | boolean | Optional | Whether each record has a periods array with the keyword's week-by-week or month-by-month detail. Default false. |
format | "json" | "jsonl" | "csv" | Optional | The file format. Default "json". |
data.result
| Name | Type | Required | Description |
|---|---|---|---|
row_count | integer | Required | Keywords in the file, whatever its format. A CSV header is not counted, and a CSV with periods can have more rows than keywords. Minimum 0. |
compressed_bytes | integer | Required | Minimum 0. |
expires_at | string (date-time) | Required |
KeywordsForAsinReport
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Required | |
report_type | "keywords_for_asin.1" | Required | |
parameters | object | Required | The request's parameters as accepted: normalised, with the defaults of interval, include_periods and format filled in. |
state | string | Required | queued and processing are unfinished; poll at least 5 seconds apart. ready has a file. failed and expired are terminal. Decide failure from state, not failure_code. One of queued, processing, ready, failed, expired. |
failure_code | string | null | Required | Stable terminal failure code. See Get a report for recovery. |
failure_message | string | null | Required | Plain-language explanation and next step for a failed report. Null in every other state. |
created_at | string (date-time) | Required | When the request was accepted. |
started_at | string | null (date-time) | Required | |
completed_at | string | null (date-time) | Required | |
result | object | null | Required | Null until successful completion. Ready and expired reports keep this metadata; a report with no matching keywords has row_count 0. Download links come only from the download endpoint. |
data.parameters
| Name | Type | Required | Description |
|---|---|---|---|
asin | string | Required | The ASIN to research: 10 letters and digits. Surrounding spaces are removed and it is stored in upper case. The report always includes the ASIN's variations. Pattern ^[A-Za-z0-9]{10}$. |
marketplace | string | Required | The marketplace to research. Case-insensitive; stored in upper case. One of US, CA, MX, UK, DE, FR, IT, ES, AU. |
interval | "weekly" | "monthly" | Required | Whether clicks and sales are weekly or monthly averages. weekly returns 403 weekly_interval_not_allowed on plans without weekly data. Default "monthly". |
start_date | string (date) | Required | First week or month of the range, YYYY-MM-DD: the first day of a month, or the Sunday that starts a week. Any other day returns 400 invalid_date with error.suggested_start_date. |
end_date | string (date) | Required | Last week or month of the range, YYYY-MM-DD, on or after start_date. The range covers at most 12 weeks or months and must lie within the research data available on your plan. |
include_periods | boolean | Optional | Whether each record has a periods array with the keyword's week-by-week or month-by-month detail. Default false. |
format | "json" | "jsonl" | "csv" | Optional | The file format. Default "json". |
data.result
| Name | Type | Required | Description |
|---|---|---|---|
row_count | integer | Required | Keywords in the file, whatever its format. A CSV header is not counted, and a CSV with periods can have more rows than keywords. Minimum 0. |
compressed_bytes | integer | Required | Minimum 0. |
expires_at | string (date-time) | Required |
Full input and output JSON Schema
Code