TikTok AdsTikTok AdsAdvertising

Your TikTok ads' spend, impressions, clicks, conversions

tiktok-ads.query

Get spend, impressions, clicks and conversions for your TikTok ads

Price
freeZum Anbieterpreis
Success rate
—Noch keine ErfolgsratendatenNoch keine Erfolgsratendaten
Latency p50
——
Last verified
—Not verified yet
GEThttps://toolswitch.dev/v1/tools/tiktok-ads.queryPreview
Try onlineDemnächstProvider docs ↗
  • Uses platform quota
  • Synchronous response
  • Reads public data

Parameter

spend is a decimal STRING in the advertiser's currency (not micros). Dimensions and metrics are validated as a pair: asking for a metric the chosen data_level does not support fails the whole request with code 40002 instead of dropping the column. Attribution follows the ad account's window, so today's conversions keep changing for days

ParameterTypErforderlichBeschreibungBeispiel
Abfrageparameter
pageGanzzahlOptional1
metricsArrayOptionalJSON array; defaults to a thin set, so always name them["spend","impressions","clicks","ctr","cpc","conversion","cost_per_conversion"]
end_dateZeichenketteOptionalYYYY-MM-DD; the window is capped (about 30 days for most report types)2026-07-28
filteringArrayOptionalJSON array of filter objects, e.g. [{"field_name":"campaign_ids","filter_type":"IN","filter_value":"[\"123\"]"}]
page_sizeGanzzahlOptionalmax 1000, default 200100
data_levelZeichenketteErforderlichAUCTION_ADVERTISER | AUCTION_CAMPAIGN | AUCTION_ADGROUP | AUCTION_AD — must match the id dimension you ask forAUCTION_CAMPAIGN
dimensionsArrayErforderlichJSON array in the query string. One id dimension plus optionally stat_time_day for a daily series: ["campaign_id","stat_time_day"]["campaign_id","stat_time_day"]
order_typeZeichenketteOptionalASC | DESCDESC
start_dateZeichenketteOptionalYYYY-MM-DD, in the advertiser's timezone; required unless query_lifetime is true2026-06-28
order_fieldZeichenketteOptionalspend
report_typeZeichenketteErforderlichBASIC (performance) | AUDIENCE (demographic breakdowns) | PLAYABLE_MATERIAL | CATALOG | BCBASIC
advertiser_idZeichenketteErforderlich7000000000000000000
query_lifetimeBooleanOptionaltrue returns all-time totals and forbids start_date/end_datefalse
  • Abfrageparameter
  • pageGanzzahlOptional

    Beispiel: 1

  • metricsArrayOptional

    JSON array; defaults to a thin set, so always name them

    Beispiel: ["spend","impressions","clicks","ctr","cpc","conversion","cost_per_conversion"]

  • end_dateZeichenketteOptional

    YYYY-MM-DD; the window is capped (about 30 days for most report types)

    Beispiel: 2026-07-28

  • filteringArrayOptional

    JSON array of filter objects, e.g. [{"field_name":"campaign_ids","filter_type":"IN","filter_value":"[\"123\"]"}]

  • page_sizeGanzzahlOptional

    max 1000, default 200

    Beispiel: 100

  • data_levelZeichenketteErforderlich

    AUCTION_ADVERTISER | AUCTION_CAMPAIGN | AUCTION_ADGROUP | AUCTION_AD — must match the id dimension you ask for

    Beispiel: AUCTION_CAMPAIGN

  • dimensionsArrayErforderlich

    JSON array in the query string. One id dimension plus optionally stat_time_day for a daily series: ["campaign_id","stat_time_day"]

    Beispiel: ["campaign_id","stat_time_day"]

  • order_typeZeichenketteOptional

    ASC | DESC

    Beispiel: DESC

  • start_dateZeichenketteOptional

    YYYY-MM-DD, in the advertiser's timezone; required unless query_lifetime is true

    Beispiel: 2026-06-28

  • order_fieldZeichenketteOptional

    Beispiel: spend

  • report_typeZeichenketteErforderlich

    BASIC (performance) | AUDIENCE (demographic breakdowns) | PLAYABLE_MATERIAL | CATALOG | BC

    Beispiel: BASIC

  • advertiser_idZeichenketteErforderlich

    Beispiel: 7000000000000000000

  • query_lifetimeBooleanOptional

    true returns all-time totals and forbids start_date/end_date

    Beispiel: false

Codebeispiele

Ersetze $TOOLSWITCH_KEY durch den in der Konsole erstellten Schlüssel.

Preview
curl -X GET 'https://toolswitch.dev/v1/tools/tiktok-ads.query' \
  -H "X-Toolswitch-Key: $TOOLSWITCH_KEY"

Diese Gateway-API ist eine Vorschauversion; URL und Authentifizierung können sich ändern. Die Beispielparameter sind Musterdaten. Aufrufe werden mit free einschließlich Servicegebühr abgerechnet.