> For the complete documentation index, see [llms.txt](https://docs.adyntel.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adyntel.com/ad-libraries/tiktok.md).

# TikTok

{% hint style="success" %}
You first need to create an account, you can sign up [here](https://app.adyntel.com/signup) to receive 50 credits to test it out.
{% endhint %}

The TikTok endpoint allows you find all TikTok ads for a given company.

It takes a company domain as input.

{% hint style="warning" %}
Company domain has to be passed in the 'company.com' format, meaning all prefixes like 'https\://' or '[www](http://www).' need to be removed.
{% endhint %}

##

## API endpoint

<mark style="color:green;">`POST`</mark> `api.adyntel.com/tiktok`

*See which TikTok ads a company is running by providing their website as input.*

### Headers <a href="#headers" id="headers"></a>

<table><thead><tr><th>Name</th><th>Value</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td><td>true</td></tr></tbody></table>

### &#x20;<a href="#undefined" id="undefined"></a>

### Body <a href="#body" id="body"></a>

<table><thead><tr><th width="166">Name</th><th width="97">Type</th><th width="353">Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><code>api_key</code></td><td>string</td><td>Adyntel API key</td><td>true</td></tr><tr><td><code>email</code></td><td>string</td><td>Adyntel account email</td><td>true</td></tr><tr><td><code>company_domain</code></td><td>string</td><td>Company website.<br><br>It has to be the brand's own domain, <code>tiktok.com</code> is rejected.</td><td>true</td></tr><tr><td><code>influencer_ads</code></td><td>boolean</td><td>Also returns the influencers posting sponsored content for the brand, each with a sample ad.<br><br><em><mark style="color:$danger;"><strong>Warning</strong></mark>: this costs one extra credit on top of the credit for the scrape itself, so a call with</em> <code>influencer_ads</code> <em>costs two credits.</em></td><td>false</td></tr><tr><td><code>webhook_url</code></td><td>string</td><td>Webhook URL where the data will be returned.<br><br>With a webhook the call answers immediately with a job id and the ads are POSTed to your URL when the scrape finishes. Without one the ads come back in the response to your call.</td><td>false</td></tr><tr><td><code>continuation_tokens</code></td><td>object</td><td>Tokens used to grab the next set of ads.<br><br>You receive them in the response to your first call, and you send them back on the next call to get the following page: <code>{"brand_ads": "&#x3C;token>", "influencers": {"&#x3C;handle>": "&#x3C;token>"}}</code>. The last page comes back with a <code>null</code> token.</td><td>false</td></tr></tbody></table>

{% hint style="info" %}
If the company runs no TikTok ads, the endpoint answers with a `204` and an empty body.
{% endhint %}

The `influencers` key is only present in the response when you pass `influencer_ads: true`.

### Example request

Request using company domain

```
{
    "api_key": "hd-nndgi7gy6b3kdsgd-a",
    "email": "elon@tesla.com",
    "company_domain": "gymshark.com"
}
```

Request including the influencer ads

```
{
    "api_key": "hd-nndgi7gy6b3kdsgd-a",
    "email": "elon@tesla.com",
    "company_domain": "gymshark.com",
    "influencer_ads": true
}
```

Request using a webhook

```
{
    "api_key": "hd-nndgi7gy6b3kdsgd-a",
    "email": "elon@tesla.com",
    "company_domain": "gymshark.com",
    "webhook_url": "your_webhook_url"
}
```

When you use a webhook the call answers straight away and the ads are sent to your URL:

```
{
    "status": "job started",
    "jobId": "4a9edbbc-abcf-44b0-8e3d-ceef332db44a"
}
```

### Example response

```
{
    "handle": "gymshark",
    "brand_ads": [
        {
            "aweme_id": "7661334167342320918",
            "url": "https://www.tiktok.com/@gymshark/video/7661334167342320918",
            "posted_at": 1783793370,
            "desc": "Onyx V1 Returns. July 16th. 7pm BST | 2pm EDT | 8pm CEST #onyxv1 #onyx #davidlaid #Gymshark ",
            "is_ad": true,
            "ad_source": 1,
            "bc_type": 0,
            "stats": {
                "play_count": 1577611,
                "digg_count": 242881,
                "comment_count": 1030,
                "share_count": 9118,
                "collect_count": 17384,
                "download_count": 1051
            },
            "music": {
                "title": "original sound - gymshark",
                "is_commerce_music": true,
                "is_original_sound": true
            },
            "anchors": [],
            "shop_product_url": null,
            "region": "GB",
            "duration": null
        }
    ],
    "influencers": [
        {
            "handle": "llivsole",
            "uid": "7582680501585527863",
            "nickname": "LIV",
            "bio": "sweat, smiles, and your fav playlist",
            "follower_count": 0,
            "aweme_count": 0,
            "total_favorited": 0,
            "trust_tier": "paid_disclosed",
            "bc_type": 1,
            "discovered_via": "#gymsharkpartner",
            "sample_ad": {
                "aweme_id": "7683197142659271950",
                "url": "https://www.tiktok.com/@llivsole/video/7683197142659271950",
                "posted_at": 1788883747,
                "desc": "I am in looove with this color AND it's cotton, use code LLIV10 at checkout for 10% off your order!! @Gymshark #gymshark #gymsharkpartner #ad ",
                "is_ad": false,
                "ad_source": null,
                "bc_type": 1,
                "stats": {
                    "play_count": 10317,
                    "digg_count": 192,
                    "comment_count": 12,
                    "share_count": 7,
                    "collect_count": 21,
                    "download_count": 1
                },
                "music": {
                    "title": "Yukon x Up hunnybee",
                    "is_commerce_music": true,
                    "is_original_sound": true
                },
                "anchors": [],
                "shop_product_url": null,
                "region": "US",
                "duration": null
            }
        }
    ],
    "continuation_tokens": {
        "brand_ads": "1787940000001",
        "influencers": {
            "gymsharkpartner": "20"
        }
    },
    "cache": {
        "hit": false,
        "age_s": 0
    }
}
```
