Datarova
Exports

get_export

Get export · Read-only, idempotent

Read one existing export's state, parameters and file metadata.

  • A project_keywords.1 export also has metrics_window: the window its keyword metrics cover, four_weeks or latest_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_ranks calls while it is queued or processing.
  • When state is ready, read a JSON or JSONL export's rows with get_export_records; give the user get_export_download_link for a CSV export, an export over 10,000 rows, or when they want the file.

Cost and limits: Costs no credits.

Input

NameTypeRequiredDescription
export_idstring (uuid)RequiredAn 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_code is machine-readable and failure_message says what to do next: export_record_limit_exceeded means the estimated or generated count exceeds 1,000,000 records; reduce the selection or dates.
  • insufficient_credits means the complete file costs more credits than the balance covers, so submit a smaller request; export_allowance_insufficient is historical, from before credits, so submit a new export; selected_label_deleted and project_access_changed are retained historical failures, so submit a new export; generation_failed retries internally; retry_exhausted is terminal, so submit a new export; invalid_export_context means 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

NameTypeRequiredDescription
idstring (uuid)Required
statestringRequiredqueued 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_codestring | nullRequiredStable 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_messagestring | nullRequiredPlain-language explanation and next step for a failed export. Null in every other state.
created_atstring (date-time)RequiredWhen the export request was accepted.
started_atstring | null (date-time)Required
completed_atstring | null (date-time)Required
resultobject | nullRequiredNull 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
parametersRankingExportRunParametersRequiredThe parameters echoed on a stored export: the request parameters with format and primary_asin_only always present after defaults are applied.

data.result

NameTypeRequiredDescription
row_countintegerRequiredMinimum 0.
compressed_bytesintegerRequiredMinimum 0.
expires_atstring (date-time)Required

data.parameters

NameTypeRequiredDescription
format"json" | "jsonl" | "csv"RequiredCSV 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_datestring (date)Required
end_datestring (date)RequiredInclusive 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_onlybooleanRequiredDefault true.
project_idsinteger[]OptionalAt least 1 item. At most 1000 items.
marketplacesstring[]OptionalEach item is one of US, CA, MX, UK, DE, FR, IT, ES, AU. At least 1 item. At most 1000 items.
project_label_idsinteger[]OptionalAt least 1 item. At most 1000 items.
asin_label_idsinteger[]OptionalAt least 1 item. At most 1000 items.
keyword_label_idsinteger[]OptionalAt least 1 item. At most 1000 items.

ProjectKeywordsExportRun

NameTypeRequiredDescription
idstring (uuid)Required
statestringRequiredqueued 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_codestring | nullRequiredStable 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_messagestring | nullRequiredPlain-language explanation and next step for a failed export. Null in every other state.
created_atstring (date-time)RequiredWhen the export request was accepted.
started_atstring | null (date-time)Required
completed_atstring | null (date-time)Required
resultobject | nullRequiredNull 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
parametersobjectRequiredThe parameters echoed on a stored export: the request parameters with format always present after the default is applied.
metrics_windowMetricsWindowRequiredThe window the file's keyword metrics cover, fixed by the account's plan when the export was accepted.

data.result

NameTypeRequiredDescription
row_countintegerRequiredMinimum 0.
compressed_bytesintegerRequiredMinimum 0.
expires_atstring (date-time)Required

data.parameters

NameTypeRequiredDescription
format"json" | "jsonl" | "csv"RequiredCSV 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_idsinteger[]OptionalAt least 1 item. At most 1000 items.
marketplacesstring[]OptionalEach item is one of US, CA, MX, UK, DE, FR, IT, ES, AU. At least 1 item. At most 1000 items.
project_label_idsinteger[]OptionalAt least 1 item. At most 1000 items.
keyword_label_idsinteger[]OptionalAt least 1 item. At most 1000 items.
Full input and output JSON Schema
JSONCode
{ "inputSchema": { "type": "object", "$schema": "https://json-schema.org/draft/2020-12/schema", "properties": { "export_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "description": "An export ID from list_exports data.exports[].id." } }, "required": [ "export_id" ], "additionalProperties": false }, "outputSchema": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/$defs/ExportRun" } }, "$defs": { "ExportRun": { "type": "object", "description": "One accepted export and its result. `failure_code` is machine-readable and `failure_message` says what to do next: `export_record_limit_exceeded` means the estimated or generated count exceeds 1,000,000 records; reduce the selection or dates. `insufficient_credits` means the complete file costs more credits than the balance covers, so submit a smaller request; `export_allowance_insufficient` is historical, from before credits, so submit a new export; `selected_label_deleted` and `project_access_changed` are retained historical failures, so submit a new export; `generation_failed` retries internally; `retry_exhausted` is terminal, so submit a new export; `invalid_export_context` means 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.", "required": [ "export_type" ], "oneOf": [ { "$ref": "#/$defs/RanksByAsinExportRun" }, { "$ref": "#/$defs/ProjectKeywordsExportRun" } ] }, "RanksByAsinExportRun": { "title": "Ranks by ASIN", "allOf": [ { "$ref": "#/$defs/ExportRunBase" }, { "type": "object", "required": [ "export_type", "parameters" ], "properties": { "export_type": { "type": "string", "enum": [ "ranks_by_asin.1" ] }, "parameters": { "$ref": "#/$defs/RankingExportRunParameters" } } } ] }, "ExportRunBase": { "type": "object", "required": [ "id", "state", "failure_code", "failure_message", "created_at", "started_at", "completed_at", "result" ], "properties": { "id": { "type": "string", "format": "uuid" }, "state": { "type": "string", "enum": [ "queued", "processing", "ready", "failed", "expired" ], "description": "`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`." }, "failure_code": { "type": [ "string", "null" ], "description": "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": { "type": [ "string", "null" ], "description": "Plain-language explanation and next step for a `failed` export. Null in every other state." }, "created_at": { "type": "string", "format": "date-time", "description": "When the export request was accepted." }, "started_at": { "type": [ "string", "null" ], "format": "date-time" }, "completed_at": { "type": [ "string", "null" ], "format": "date-time" }, "result": { "type": [ "object", "null" ], "description": "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.", "required": [ "row_count", "compressed_bytes", "expires_at" ], "properties": { "row_count": { "type": "integer", "minimum": 0 }, "compressed_bytes": { "type": "integer", "minimum": 0 }, "expires_at": { "type": "string", "format": "date-time" } } } } }, "RankingExportRunParameters": { "title": "ranks_by_asin.1 parameters (normalised)", "description": "The parameters echoed on a stored export: the request parameters with `format` and `primary_asin_only` always present after defaults are applied.", "allOf": [ { "$ref": "#/$defs/RankingExportParameters" }, { "type": "object", "required": [ "format", "primary_asin_only" ] } ] }, "RankingExportParameters": { "title": "ranks_by_asin.1 parameters", "type": "object", "required": [ "start_date", "end_date" ], "properties": { "format": { "type": "string", "enum": [ "json", "jsonl", "csv" ], "description": "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": { "type": "string", "format": "date" }, "end_date": { "type": "string", "format": "date", "description": "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": { "type": "boolean", "default": true }, "project_ids": { "type": "array", "minItems": 1, "maxItems": 1000, "items": { "type": "integer", "minimum": 1, "maximum": 2147483647 } }, "marketplaces": { "type": "array", "minItems": 1, "maxItems": 1000, "items": { "type": "string", "enum": [ "US", "CA", "MX", "UK", "DE", "FR", "IT", "ES", "AU" ] } }, "project_label_ids": { "type": "array", "minItems": 1, "maxItems": 1000, "items": { "type": "integer", "minimum": 1, "maximum": 2147483647 } }, "asin_label_ids": { "type": "array", "minItems": 1, "maxItems": 1000, "items": { "type": "integer", "minimum": 1, "maximum": 2147483647 } }, "keyword_label_ids": { "type": "array", "minItems": 1, "maxItems": 1000, "items": { "type": "integer", "minimum": 1, "maximum": 2147483647 } } }, "description": "Daily keyword ranks for the selected ASINs over an inclusive date range. Every option, including the output format and the filter parameters, is a direct property of this object. Before file generation, the background worker estimates selected ASINs × selected keywords × inclusive days per marketplace project and sums those products. Estimates above 1,000,000 fail asynchronously; equality passes. Acceptance holds credits for the estimate. Historical tracking periods do not reduce the estimate." }, "ProjectKeywordsExportRun": { "title": "Project keywords", "allOf": [ { "$ref": "#/$defs/ExportRunBase" }, { "type": "object", "required": [ "export_type", "parameters", "metrics_window" ], "properties": { "export_type": { "type": "string", "enum": [ "project_keywords.1" ] }, "parameters": { "$ref": "#/$defs/ProjectKeywordsExportRunParameters" }, "metrics_window": { "$ref": "#/$defs/MetricsWindow", "description": "The window the file's keyword metrics cover, fixed by the account's plan when the export was accepted." } } } ] }, "ProjectKeywordsExportRunParameters": { "title": "project_keywords.1 parameters (normalised)", "description": "The parameters echoed on a stored export: the request parameters with `format` always present after the default is applied.", "allOf": [ { "$ref": "#/$defs/ProjectKeywordsExportParameters" }, { "type": "object", "required": [ "format" ] } ] }, "ProjectKeywordsExportParameters": { "title": "project_keywords.1 parameters", "type": "object", "properties": { "format": { "type": "string", "enum": [ "json", "jsonl", "csv" ], "description": "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": { "type": "array", "minItems": 1, "maxItems": 1000, "items": { "type": "integer", "minimum": 1, "maximum": 2147483647 } }, "marketplaces": { "type": "array", "minItems": 1, "maxItems": 1000, "items": { "type": "string", "enum": [ "US", "CA", "MX", "UK", "DE", "FR", "IT", "ES", "AU" ] } }, "project_label_ids": { "type": "array", "minItems": 1, "maxItems": 1000, "items": { "type": "integer", "minimum": 1, "maximum": 2147483647 } }, "keyword_label_ids": { "type": "array", "minItems": 1, "maxItems": 1000, "items": { "type": "integer", "minimum": 1, "maximum": 2147483647 } } }, "description": "The current keyword metrics of every selected keyword attachment, one record each. Every parameter is optional; an empty object exports every keyword attachment in your projects. There are no dates: `start_date`, `end_date`, `asin_label_ids`, `primary_asin_only` and any other key are rejected with `invalid_export_parameters`. After acceptance, each generation attempt first estimates one record per selected keyword attachment. Estimates above 1,000,000 fail asynchronously; equality passes. Acceptance holds credits for the estimate." }, "MetricsWindow": { "type": "string", "enum": [ "four_weeks", "latest_month" ], "description": "The period the keyword metrics cover, set by the account's plan. `four_weeks`: the latest four loaded weeks, compared with the four weeks before them. `latest_month`: the latest loaded month, compared with the month before it, for plans without weekly data. Fields ending in `_l4w` hold values for this window whichever it is." } } } }