Social Media Scraping 2 min read

How to Scrape Images from TikTok Slideshows

Ever wondered how to extract TikTok images from a TikTok photo carousel? This article explains exactly how to do it

by
image of how to scrape images from tiktok slideshow

Why Slideshows?

TikTok photo carousels, or slideshows, are helping creators get millions of views, with relatively little effort.

If you’ve ever wanted to scrape the images from a TikTok, here’s how you do it:

How to:

Let’s take this account as an example: https://www.tiktok.com/@mens.guidance

All of their posts are photo carousels and some of their posts are popping off.

First sign up for this product named Scape Creators, it grabs public social media data in real time.

image

It only take a couple clicks to sign up.

Let’s use this post as a example: https://www.tiktok.com/@mens.guidance/photo/7467226363544554770

We want to grab the images from this post.

The endpoint we will be hitting will be TikTok Video Endpoint (docs link)

You can test it out using the playground.

image

Pro tip, enable trim to trim the response to make it a little more manageable.

image

Look for the key `image_post_info`.

That will have an array called `images`

And we actually want to go into the `thumbnail` key to get the image that doesn’t have a watermark.

Key into the first url in `url_list`, and we have the url of the image!

Go ahead and visit that url to verify.

image

To get all the images, simply loop over the images array!

In code it would look like this:

We are gonna use JavaScript (Node.js) for this example.

I’m using the http client library called axios here, but feel free to use the one you want.

const response = await axios.get(
  `https://api.scrapecreators.com/v2/tiktok/video?url=https://www.tiktok.com/@mens.guidance/photo/7467226363544554770`,
  {
    headers: {
      "x-api-key": process.env.SCRAPE_CREATORS_API_KEY,
    },
  },
);

const imageUrls = response.data.aweme_detail?.image_post_info?.images?.map(
  (image) => image.thumbnail?.url_list?.[0],
);

console.log(imageUrls);

And that’s it!

Those url’s will expire after a few hours, so if you want to save them to view later, you will want to download them and then upload them to a cloud storage provider like supabase storage, Amazon S3, or Cloudinary, etc.

In node.js you would fs to download the image.

Also, if you don’t want to do this for each individual video, you can use Scrape Creators Profile Videos endpoint to grab the user’s first 20 tiktoks (or however many you want), and then loop through all their tiktoks and grab the images (or videos) from all of them.

Adrian Horning

Written by

Adrian Horning

Founder of ScrapeCreators. I write about social data APIs, scraper reliability, and turning public creator data into useful products.

Connect

ScrapeCreatorsScrapeCreators

Social Media Scraping API
for Developers

Real-time data from TikTok, Instagram, YouTube, X, Facebook, Reddit, and more.

Real-time Data

Fresh, accurate, always up-to-date.

No Proxies

We handle the infrastructure.

Developer First

Simple API. Powerful results.

TikTok logoInstagram logoYouTube logoX logoFacebook logoReddit logo
{200 OK
"platform": "youtube",
"type": "video",
"title": "Never Gonna Give You Up",
"views": 12504321,
"transcript": "We're no strangers to love...",
}
Success124ms
Purple gift box representing 100 free ScrapeCreators credits

Get 100 credits on us - instantly.

No credit card required. Start building for free.

Try the API, on us.

New developers get 100 free credits automatically when they sign up. No credit card required.

Get started free
Trusted by 10,000+ developers
99.9% uptime
Secure API access