ads_get_export

Poll a bulk export submitted with ads_campaign_export / ads_ad_group_export / ads_target_export / ads_ad_export; downloads the file once status=COMPLETED.

readAmazon Adsads.exports

Amazon Ads API · GetExport · GET /exports/{exportId} Docs: https://advertising.amazon.com/API/docs/en-us/exports#tag/Exports/operation/GetExport

Call it

In an AI client (MCP)

tools/call
{
  "name": "ads_get_export",
  "arguments": {
    "store": "myStore-US",
    "countryCode": "<countryCode>",
    "exportId": "<exportId>",
    "typeExport": "<typeExport>"
  }
}

From code (Tool API)

curl -X POST https://api.sellersheetai.com/api/v1/tools/ads_get_export \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store":"myStore-US","countryCode":"<countryCode>","exportId":"<exportId>","typeExport":"<typeExport>"}'
Early access — the Tool API is open on request, contact us.

Arguments

NameTypeDescription
storerequiredstringthe store ref `<store>-<CC>` (name-country, e.g. 'myStore-US') — one of get_user_context's store_refs, verbatim.
countryCoderequiredstringthe Ads profile's 2-letter country code (e.g. 'US').
exportIdrequiredstringfrom the submit call.
typeExportrequiredstring'campaigns' | 'adGroups' | 'targets' | 'ads' — MUST match the export you submitted (selects the download's Accept header); no default, an unknown/missing value is refused.

Result

Every tool answers {notification, data, human_action}; data carries:

  • Amazon's payload in data.result.
  • data.result.status — PROCESSING, COMPLETED or FAILED (data.result.error {errorCode, message} on FAILED).
  • data.result.exportData — the parsed records once COMPLETED (see Gotchas).

Gotchas

  • The download is gunzipped and parsed server-side into data.result.exportData (a list of dicts), capped at 20,000 records. When the export is larger, exportDataTruncated=true and exportDataTotalRecords gives the real count — fetch data.result.url (short-lived) for the rest. If Amazon ever serves a non-JSON format, exportDataParsed=false and exportData is a base64 slice with exportDataError explaining why.

On this page

Actions

View as Markdown

Ask an assistant

Ask ChatGPTAsk Claude