Circle Separator4 Min. Lesezeit

How to Connect TikTok Ads to JSON

A managed connector is the fastest way to send TikTok Ads data to JSON. A typical setup has eight steps: connect the account, select the advertiser, choose a report, select metrics and dimensions, set the reporting period, add filters, create the endpoint and schedule refreshes.

Build directly with the TikTok Marketing API when you need control over authentication, data processing, schema design or campaign management.

RequirementRecommended approach
Scheduled TikTok Ads reports in JSONManaged connector
No-code or low-code setupManaged connector
Custom campaign managementTikTok Marketing API
Custom data warehouse pipelineTikTok Marketing API or managed connector
A URL that scripts can requestJSON connector with a stable endpoint
Full control over API responsesTikTok Marketing API

What Does "TikTok Ads to JSON" Mean?

TikTok Ads to JSON means extracting advertising data from TikTok Ads Manager and delivering it as structured JSON.

The data can include:

  • Campaigns
  • Ad groups
  • Ads
  • Impressions
  • Clicks
  • Conversions
  • Spend
  • Reach
  • Video views
  • Cost metrics
  • Audience dimensions
  • Creative or placement data

JSON is useful because scripts, dashboards, applications, AI tools and data pipelines can read it without manually downloading spreadsheets.

TikTok's Marketing API provides programmatic access to TikTok Ads Manager for querying data, creating campaigns, managing ads and generating reports.

How to Export TikTok Ads Data to JSON

A managed TikTok Ads to JSON integration usually works like this:

  1. Connect and authorize the TikTok Ads account.
  2. Select the advertiser account.
  3. Choose a report, such as a campaign, ad group or ad report.
  4. Select metrics and dimensions.
  5. Set the reporting period.
  6. Add filters if needed.
  7. Generate a JSON endpoint.
  8. Schedule automatic refreshes.

For example, Coupler.io lets users connect TikTok Ads, choose a report, select metrics and dimensions, apply filters and generate an HTTPS URL that returns the latest data as JSON.

A script can request the endpoint with a standard HTTP GET request:

curl "$TIKTOK_JSON_URL"

The response can then be sent to a data warehouse, internal application, reporting tool or automation workflow.

Example TikTok Ads JSON Structure

A campaign performance report could use a structure like this:

{
  "source": "tiktok_ads",
  "report": "campaign_performance",
  "currency": "USD",
  "rows": [
    {
      "campaign_id": "1234567890",
      "campaign_name": "Spring Product Campaign",
      "ad_group_id": "9876543210",
      "impressions": 125000,
      "clicks": 4200,
      "spend": 1850.75,
      "conversions": 142,
      "ctr": 0.0336,
      "cpc": 0.4407
    }
  ]
}

This example is illustrative. Field names and available values depend on the report type, selected dimensions, selected metrics and connector schema.

Which TikTok Ads Report Should You Export?

Choose the report according to the level of analysis you need.

Report typeBest for
Campaign reportBudget, delivery and performance by campaign
Ad group reportAudience, placement, bidding and optimization analysis
Ad reportCreative-level performance
Creative reportComparing videos, images and ad variations
Advertiser reportAccount-level summaries
Audience reportDemographic and audience breakdowns
Product or catalog reportCommerce and product performance

A campaign report is usually a practical starting point because it gives you a compact view of spend and results. Use an ad-level report when you need to compare creative performance or identify which videos generate the strongest results.

Managed Connector Versus TikTok Marketing API

Use a managed connector for reporting with less development work. Use the TikTok Marketing API when you need to control the requests, data processing or advertising operations.

Managed Connector

A managed connector is a good fit when the main goal is reporting.

Advantages include:

  • Faster setup
  • Less authentication code
  • No need to maintain API requests
  • Built-in report selection
  • Scheduled refreshes
  • A stable JSON endpoint
  • Easier filtering and field selection

Coupler.io states that its TikTok Ads integration supports campaign, ad group, ad and other report types, historical reporting periods, filters, scheduled refreshes and JSON delivery through an HTTPS URL.

The trade-offs are:

  • Less control over request logic
  • Dependence on the connector's supported fields
  • A subscription may be required for frequent refreshes
  • The provider may determine the JSON schema

TikTok Marketing API

The TikTok Marketing API is a better fit for developers building a custom data pipeline or advertising application.

Advantages include:

  • Full control over API requests
  • Custom data transformations
  • Custom authentication and storage
  • Direct integration with internal systems
  • The ability to query, create and manage advertising resources
  • Support for automated reporting workflows

TikTok describes the Marketing API as the API for working with TikTok Ads Manager at scale. It supports data queries, ad creation, campaign management and customized reports.

The trade-offs are:

  • Developer setup is required
  • Authentication and token management become your responsibility
  • API changes must be monitored
  • You must handle errors and retries
  • Report schemas require ongoing maintenance

Basic Custom API Workflow

A custom TikTok Ads to JSON pipeline usually has five components:

  1. AuthenticationThe application obtains the required TikTok API credentials and access token.

  2. Report requestThe application requests a campaign, ad group, ad or other report.

  3. PaginationThe application retrieves every result page when a report contains more records than one response can return.

  4. TransformationThe application renames fields, converts data types and standardizes dates, currencies and metric values.

  5. JSON deliveryThe application stores the data as a file, serves it from an API endpoint or loads it into another system.

A simplified application response could look like this:

{
  "source": "tiktok_ads",
  "data": [
    {
      "campaign_id": "1234567890",
      "spend": 1850.75,
      "clicks": 4200
    }
  ]
}

A production implementation should also handle expired tokens, rate limits, failed requests, missing metrics, duplicate rows and changes to report fields.

Important Security Consideration for JSON URLs

A JSON endpoint may contain an access token in the URL. Anyone with the complete URL may be able to request the data.

Treat a tokenized JSON URL like a password:

  • Do not publish it in client-side code
  • Do not place it in public repositories
  • Do not share it in screenshots
  • Store it in a secret manager where possible
  • Rotate or regenerate it if it is exposed
  • Use a server-side proxy for public applications

Coupler.io warns that users with the complete JSON URL can access the data because the URL contains an access token.

TikTok Ads API Versus TikTok Events API

The TikTok Marketing API and TikTok Events API serve different purposes.

  • TikTok Marketing API: Retrieves advertising data and supports campaign, ad group and ad management.
  • TikTok Events API: Sends conversion and marketing event data to TikTok for measurement and attribution.

TikTok describes the Events API as a way to share marketing data from web, app and offline sources. The Marketing API handles advertising operations and reporting.

Use TikTok Ads to JSON when you need reporting or advertising data outside TikTok Ads Manager. Use the Events API when you need to send conversion events into TikTok.

Best Option for Most Teams

Use a managed TikTok Ads to JSON connector when you need scheduled reporting, a reusable endpoint or a quick connection to a script, dashboard or AI tool.

Use the TikTok Marketing API when you are building a custom advertising platform, need advanced data transformation or want to manage campaigns programmatically.

For a simple reporting pipeline:

  1. Connect TikTok Ads.
  2. Select a campaign, ad group or ad report.
  3. Choose the required metrics and dimensions.
  4. Filter the data.
  5. Generate a JSON endpoint.
  6. Schedule refreshes.
  7. Protect the endpoint token.

This approach provides TikTok Ads data in JSON without requiring a complete custom API integration.

Als Nächstes lesen