# Download TikTok Ad Videos from the Library

**Use case:** 

Scrape TikTok ads and re-host the video and image creatives permanently — build a swipe file with links that never expire.

## Input

```json
{
  "maxResults": 30,
  "fetchAdDetail": false,
  "downloadMedia": true,
  "startUrls": [
    {
      "url": "https://library.tiktok.com/ads?region=DE&adv_name=nike&sort_type=last_shown_date,desc"
    }
  ],
  "keywords": [
    {
      "query": "Shein",
      "region": "all",
      "searchAsAdvertiser": true,
      "sortOrder": "newest"
    }
  ]
}
```

## Output

```json
{
  "videos.0.cover_img": {
    "label": "Cover",
    "format": "image"
  },
  "id": {
    "label": "Ad ID",
    "format": "string"
  },
  "name": {
    "label": "Advertiser",
    "format": "string"
  },
  "type": {
    "label": "Creative type",
    "format": "string"
  },
  "videos.0.video_url": {
    "label": "Video URL",
    "format": "link"
  },
  "videos.0.video_download_url": {
    "label": "Video (saved)",
    "format": "link"
  },
  "image_urls": {
    "label": "Images",
    "format": "array"
  },
  "image_download_urls": {
    "label": "Image downloads",
    "format": "array"
  },
  "last_shown_date": {
    "label": "Last shown",
    "format": "integer"
  }
}
```

## About this Actor

This example demonstrates how to use [TikTok Ad Library - Free To Use](https://apify.com/dz_omar/tiktok-ad-library-scraper) with a specific input configuration. Visit the [Actor detail page](https://apify.com/dz_omar/tiktok-ad-library-scraper) to learn more, explore other use cases, and run it yourself.