API & AI assistants/What the API reads

What the API reads

Every endpoint of the Gloriads API — performance and comparisons, products, Streaming TV, campaigns, keywords and ads, rules and activity — with its parameters, an example, and how fresh the figures are.

The API reads the same figures as your Gloriads screens. It never changes your account or your ads.

Endpoints

EndpointWhat it returns
GET /api/v1/accountYour subscription, whether Amazon Ads is connected, and up to which day the figures go. Call it first.
GET /api/v1/marketplacesYour connected marketplaces, with their currency and how many campaigns, ad groups and ads each runs.
GET /api/v1/summaryThe totals of a period: the dashboard's cards, per marketplace and per ad type too.
GET /api/v1/timelineThe same figures day by day or month by month: the dashboard's chart.
GET /api/v1/reports/productsEach advertised product's figures over a period: the Products page.
GET /api/v1/reports/streaming-tvOne marketplace's Streaming TV campaigns and their figures.
GET /api/v1/campaignsOne marketplace's campaigns, with budget, targeting and state.
GET /api/v1/ad-groupsOne marketplace's ad groups, with their default bid.
GET /api/v1/targetsOne campaign's keywords and other targets, with match type and bid.
GET /api/v1/adsOne campaign's ads: the products it advertises.
GET /api/v1/rulesYour rules: on or off, where they act, their schedule, their last run.
GET /api/v1/rules/{rule_id}/runsOne rule's last 20 runs.
GET /api/v1/activityEverything Gloriads did on Amazon, newest first.
GET /api/v1/activity/{operation_id}One operation.
GET /api/v1/activity/{operation_id}/linesWhat one operation created, changed or archived, line by line.

Every parameter and every field is in the API reference, with a Try it button.

Periods

/summary, /timeline and /reports/products cover a period. Send one of:

ParameterExampleMeaning
rangelast_30_daystoday, yesterday, last_7_days, last_14_days, last_30_days, last_60_days, last_90_days, this_month, last_month, this_year, last_year, all_time
start_date + end_date2026-09-01 and 2026-09-30Two days, both included, at most six years apart
  • Nothing sent: last_30_days, like the dashboard.
  • A range covers complete days, the ones the dashboard sums: last_30_days is the 30 days ending yesterday, and this_month and this_year stop at yesterday. Amazon credits a sale to its click days later, so today is never complete.
  • today is today, and so is this_month on the 1st (it has no complete day yet).
  • all_time starts at the oldest day Gloriads holds and goes through today, like Lifetime on the dashboard.
  • To include today, send start_date and end_date with end_date = today.
  • timezone (Europe/Paris, America/New_York…) decides which day "today" is. UTC by default.
  • Every answer repeats the days it covers in period.

Compare two periods

Add compare to /summary, /timeline or /reports/products, like Compare to on the dashboard:

compareCompared to
previous_periodThe same number of days just before. This month so far is compared with the same days of last month, and last month with the month before.
same_period_last_yearThe same dates one year earlier.

The answer adds a comparison with the compared period's figures and, for spend, sales, ACOS, impressions, clicks, CPC and purchases, how each changed:

"changes": {
  "spend": { "kind": "change", "percent": 18.2, "direction": "up", "tone": "neutral" },
  "acos": { "kind": "change", "percent": -6.5, "direction": "down", "tone": "good" }
}
  • Both periods end yesterday, like on the dashboard: dates that reach today lose today, and period says so.
  • kind: "new" means the figure was zero before; kind: "none" means there is nothing to compare (ACOS without sales).
  • tone says whether it is good news, like the dashboard's colors. Spend is always neutral.
  • all_time has nothing before it, and today has no complete day: comparison then says why in unavailable.
  • When Gloriads holds no history for the compared period, its figures are null and history_covered is false.

Filters

ParameterExampleKeeps
marketplacesUS,UKThese countries only (GB works too)
ad_productsSPONSORED_PRODUCTSSPONSORED_PRODUCTS, SPONSORED_BRANDS or SPONSORED_DISPLAY

An unknown value is refused with a 400 that names it, never answered with zeros.

Totals of a period

curl "https://gloriads.com/api/v1/summary?range=last_month&marketplaces=US" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "period": { "start_date": "2026-09-01", "end_date": "2026-09-30", "range": "last_month", "timezone": "UTC" },
  "currency": "USD",
  "spend": 13140.53,
  "sales": 46562.2,
  "acos": 28.22,
  "roas": 3.54,
  "impressions": 3945723,
  "clicks": 13973,
  "ctr": 0.35,
  "average_cpc": 0.94,
  "purchases": 1479,
  "conversion_rate": 10.58,
  "by_marketplace": [ … ],
  "by_ad_product": [ … ],
  "meta": { "data_last_date": "2026-10-09", "history_covered": true, "truncated": false }
}
  • acos, ctr and conversion_rate are percentages: 28.22 means 28.22 %.
  • purchases counts orders, like the console's Purchases, not units.
  • A ratio without its base (ACOS with no sale) is null, never 0.

Day by day or month by month

/timeline takes the same period and filters, and returns one point per day or per month in data.

  • granularity=auto (the default) picks days up to 92 days, months beyond, like the dashboard's chart.
  • granularity=day is refused on a period longer than 92 days.
  • A day without any figure is left out.

Per product

/reports/products returns one row per advertised product (ASIN), sorted by sort (spend by default) and order (desc by default).

  • product_id: null gathers what Amazon ties to no product, mostly Sponsored Brands.
  • title is the product's name as Amazon's product report gives it, on the marketplace where it spent the most in the period. It is null for product_id: null, and until Gloriads has received the account's product titles from Amazon.
  • The rows come in pages: see Limits and errors.

Streaming TV

The other reports leave Streaming TV (TV ads on Prime Video and streaming apps) out, like the dashboard: Amazon does not put it in the report they come from. /reports/streaming-tv reads it from a separate Amazon report, for one marketplace.

curl "https://gloriads.com/api/v1/reports/streaming-tv?marketplace_id=3478512345678901&range=last_30_days" \
  -H "Authorization: Bearer YOUR_API_KEY"
  • A period of 31 days at most, within the last 95 days: Amazon's limits for this report.
  • The first call for a period may answer "status": "pending" while Amazon makes the report, usually a few minutes. Call again after meta.retry_after_seconds. The report is then kept 3 hours.
  • Each campaign comes with its spend, impressions, cpm (cost per 1,000 impressions), clicks, sales, purchases and units_sold.
  • Amounts are in the marketplace's own currency, not in USD.
  • "status": "unavailable": Amazon does not offer Streaming TV to this account, for example a KDP author's.

Campaigns and ad groups

Both need marketplace_id: an id from /marketplaces.

curl "https://gloriads.com/api/v1/campaigns?marketplace_id=3478512345678901&states=ENABLED" \
  -H "Authorization: Bearer YOUR_API_KEY"
  • They list enabled and paused campaigns of Sponsored Products, Sponsored Brands and Display. Archived ones are never listed.
  • Budgets and bids are in the marketplace's own currency (currency_code in /marketplaces).
  • provenance says whether Gloriads created the campaign, changed it, or never touched it.
  • /ad-groups?campaign_id=… keeps one campaign's ad groups.
  • Up to 1,000 rows per page (100 by default).

Keywords, targets and ads

/targets and /ads list what is inside one campaign. Both need marketplace_id and campaign_id; ad_group_id keeps one of its ad groups.

curl "https://gloriads.com/api/v1/targets?marketplace_id=3478512345678901&campaign_id=28430987654321" \
  -H "Authorization: Bearer YOUR_API_KEY"
  • /targets lists each keyword with its match_type (EXACT, PHRASE, BROAD), the product targets (ASINs), categories, auto-targeting groups and negatives, with their bid and state. bid: null means it bids the ad group's default bid.
  • /ads lists each ad with the products it advertises (product_ids).
  • They are read from Amazon at the moment you ask, and carry no figures.
  • Sponsored Products, Sponsored Brands and Display. Archived ones are never listed.
  • Up to 1,000 rows per page (100 by default).

Rules and activity

  • /rules lists every rule, most recently edited first.
  • /rules/{rule_id}/runs shows what each recent run looked at and changed. Tests are not listed.
  • /activity lists every operation Gloriads ran on Amazon: a campaign created or copied, products added, a rule's changes, an undo. A rule's run appears once per marketplace, with the same rule_run_id. tool=rule keeps only the rules'.
  • /activity/{operation_id} reads one operation: poll it to follow one still running.
  • /activity/{operation_id}/lines lists what the operation did, line by line: the campaign, ad group, ad or target, whether it was created, changed or archived, each value before and after, and Amazon's error when a line failed. Up to 500 lines per page: a rule's run can hold 5,000.

How fresh the figures are

  • They are your dashboard's figures, read from the same data with the same code.
  • Performance amounts are in USD. Amazon converts each marketplace's figures.
  • Amazon credits sales several days after the click, so the last days of a period still grow for a while. meta.data_last_date says up to which day the figures go.
  • Campaigns are read from Amazon at most every 30 minutes per marketplace. meta.synced_at says when. On the very first call for a marketplace the list may be empty with meta.syncing: true: call again a minute later.
  • Product figures refresh once a day. A period that starts before the history Gloriads holds returns meta.history_covered: false.
  • Keywords, targets and ads are read live from Amazon, at each call: meta.read_at says when.
  • Streaming TV figures are kept 3 hours after Amazon makes their report: meta.report_ready_at says when.