Run an Amazon Marketing Cloud (AMC) SQL query via the AMC API and download results

domain: advertising.amazon.com/API/docs · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate via the Amazon Ads API OAuth 2.0 flow and request an access token with the Amazon Advertising scope
  2. POST a query definition to the AMC query endpoint, providing an SQL statement that joins the impressions, clicks, and purchases datasets and specifying a time window in the request body
  3. Poll the query execution status endpoint using the returned query execution ID until the status field equals SUCCEEDED
  4. Retrieve the S3 output location from the query result metadata, then use the provided pre-signed S3 URL (or Amazon Ads report download endpoint) to fetch the result file
  5. Parse the downloaded gzipped JSON or CSV output and load it into your analytics store
  6. Optionally schedule recurring queries by registering a workflow with a cron-style time_window_type and recurrence settings

Known gotchas

Related routes

Execute an on-demand Amazon Marketing Cloud (AMC) workflow and retrieve results via the Ads API
advertising.amazon.com · 5 steps · unrated
Schedule recurring Amazon Marketing Cloud queries with the workflowSchedules API
advertising.amazon.com · 5 steps · unrated
Execute Marketing Cloud Automation Studio SQL query activities programmatically using the SOAP API
developer.salesforce.com · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans