Exports
get_export
Get export · Read-only, idempotent
Read one existing export's state, parameters and file metadata.
- A
project_keywords.1export also hasmetrics_window: the window its keyword metrics cover,four_weeksorlatest_month, fixed by the plan at acceptance. - Poll unfinished exports at least 5 seconds apart.
- A queued export can wait several minutes for its turn, so keep polling for at least 10 minutes before treating it as stuck, and do not switch to per-ASIN
get_project_asin_rankscalls while it is queued or processing. - When state is ready, read a JSON or JSONL export's rows with
get_export_records; give the userget_export_download_linkfor a CSV export, an export over 10,000 rows, or when they want the file.
Cost and limits: Costs no credits.
Input
| Name | Type | Required | Description |
|---|---|---|---|
export_id | string (uuid) | Required | An export ID from list_exports data.exports[].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 export and its result.
failure_codeis machine-readable andfailure_messagesays what to do next:export_record_limit_exceededmeans the estimated or generated count exceeds 1,000,000 records; reduce the selection or dates.insufficient_creditsmeans the complete file costs more credits than the balance covers, so submit a smaller request;export_allowance_insufficientis historical, from before credits, so submit a new export;selected_label_deletedandproject_access_changedare retained historical failures, so submit a new export;generation_failedretries internally;retry_exhaustedis terminal, so submit a new export;invalid_export_contextmeans the saved request could not be processed, so submit a new export; Failed exports cost nothing.- Finished details remain at least 90 days after activity and cycle end and longer while reconciliation needs them, then may return 404.
- Usage counters remain.
data is one of 2 shapes.
RanksByAsinExportRun
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Required | |
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. export_record_limit_exceeded means the estimated or generated count exceeds 1,000,000 per export. insufficient_credits means the complete file costs more credits than its hold and the rest of the credit balance. export_allowance_insufficient is historical, from exports accepted before credits launched. See Get an export for recovery guidance. |
failure_message | string | null | Required | Plain-language explanation and next step for a failed export. Null in every other state. |
created_at | string (date-time) | Required | When the export 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, including failed exports. Ready and expired exports retain this metadata; a successful empty file has row_count 0. Download URLs are returned only by the download-link endpoint. |
export_type | "ranks_by_asin.1" | Required | |
parameters | RankingExportRunParameters | Required | The parameters echoed on a stored export: the request parameters with format and primary_asin_only always present after defaults are applied. |
data.result
| Name | Type | Required | Description |
|---|---|---|---|
row_count | integer | Required | Minimum 0. |
compressed_bytes | integer | Required | Minimum 0. |
expires_at | string (date-time) | Required |
data.parameters
| Name | Type | Required | Description |
|---|---|---|---|
format | "json" | "jsonl" | "csv" | Required | CSV prefixes an apostrophe to text starting with an ASCII control character or DEL, or with =, +, - or @ after optional whitespace, so spreadsheets treat those cells as text. This includes project names and keywords. Numeric columns and JSON/JSONL values are unchanged. Default "json". |
start_date | string (date) | Required | |
end_date | string (date) | Required | Inclusive Los Angeles ranking day, no later than today in America/Los_Angeles. Today's records are a snapshot taken when the file is generated. Future dates return 400 future_dates_not_allowed. |
primary_asin_only | boolean | Required | Default true. |
project_ids | integer[] | Optional | At least 1 item. At most 1000 items. |
marketplaces | string[] | Optional | Each item is one of US, CA, MX, UK, DE, FR, IT, ES, AU. At least 1 item. At most 1000 items. |
project_label_ids | integer[] | Optional | At least 1 item. At most 1000 items. |
asin_label_ids | integer[] | Optional | At least 1 item. At most 1000 items. |
keyword_label_ids | integer[] | Optional | At least 1 item. At most 1000 items. |
ProjectKeywordsExportRun
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Required | |
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. export_record_limit_exceeded means the estimated or generated count exceeds 1,000,000 per export. insufficient_credits means the complete file costs more credits than its hold and the rest of the credit balance. export_allowance_insufficient is historical, from exports accepted before credits launched. See Get an export for recovery guidance. |
failure_message | string | null | Required | Plain-language explanation and next step for a failed export. Null in every other state. |
created_at | string (date-time) | Required | When the export 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, including failed exports. Ready and expired exports retain this metadata; a successful empty file has row_count 0. Download URLs are returned only by the download-link endpoint. |
export_type | "project_keywords.1" | Required | |
parameters | object | Required | The parameters echoed on a stored export: the request parameters with format always present after the default is applied. |
metrics_window | MetricsWindow | Required | The window the file's keyword metrics cover, fixed by the account's plan when the export was accepted. |
data.result
| Name | Type | Required | Description |
|---|---|---|---|
row_count | integer | Required | Minimum 0. |
compressed_bytes | integer | Required | Minimum 0. |
expires_at | string (date-time) | Required |
data.parameters
| Name | Type | Required | Description |
|---|---|---|---|
format | "json" | "jsonl" | "csv" | Required | CSV joins label names with ", " and prefixes an apostrophe to text starting with an ASCII control character or DEL, or with =, +, - or @ after optional whitespace, so spreadsheets treat those cells as text. This includes project names, keywords and label names. Numeric columns and JSON/JSONL values are unchanged. Default "json". |
project_ids | integer[] | Optional | At least 1 item. At most 1000 items. |
marketplaces | string[] | Optional | Each item is one of US, CA, MX, UK, DE, FR, IT, ES, AU. At least 1 item. At most 1000 items. |
project_label_ids | integer[] | Optional | At least 1 item. At most 1000 items. |
keyword_label_ids | integer[] | Optional | At least 1 item. At most 1000 items. |
Full input and output JSON Schema
Code