# Search Advertisers

Resolves an advertiser name fragment to TikTok's exact registered advertiser names and business ids for advertiser-filtered capabilities.

- Platform: [TikTok Ad Library](https://docs.upscrape.com/docs/platforms/tiktok-adlibrary)
- Capability ID: `tiktok-adlibrary.advertiser.search`
- Cost: 10 credits per request
- Maximum runtime: 60 seconds
- Execute endpoint: `POST https://data.upscrape.com/execute`

## Request

Use the exact public capability ID in the shared execute envelope.

```bash
curl --request POST \
  --url https://data.upscrape.com/execute \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "limit": 5,
    "query": "nike"
  },
  "capability": "tiktok-adlibrary.advertiser.search"
}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | `integer` | No | Maximum number of advertiser matches. |
| `query` | `string` | Yes | Advertiser name fragment. |

### Example input

```json
{
  "limit": 5,
  "query": "nike"
}
```

## Response

Successful output is returned in `results[0].data`. Raw platform output is intentionally open-ended and may evolve with the upstream source.

### Illustrative sample output

This redacted fixture is an example, not a fixed response schema.

```json
{
  "items": [
    {
      "business_id": "7587573238117498896",
      "name": "NIKE COM SRL"
    },
    {
      "business_id": "6876453864464188162",
      "name": "NIKE Retail B.V."
    }
  ],
  "total_items": 2
}
```
### Illustrative output fields

Derived from the sample above for orientation only. These fields are not a fixed response schema.

| Path | Observed type | Example |
| --- | --- | --- |
| `items` | `array` | 2 items |
| `items` | `array` | 2 items |
| `total_items` | `integer` | 2 |

## Execution behavior

A `200` response completed inline. A `202` response was queued; poll `GET /jobs/{id}` until the job reaches `completed` or `failed`. Use an `Idempotency-Key` when retrying must not create a duplicate logical job.

## Related documentation

- [Authentication](https://docs.upscrape.com/docs/api/authentication)
- [Jobs and results](https://docs.upscrape.com/docs/api/jobs)
- [Errors and retries](https://docs.upscrape.com/docs/api/errors)
- [Idempotency](https://docs.upscrape.com/docs/api/idempotency)
