For the complete documentation index, see llms.txt. This page is also available as Markdown.

TikTok Shop

Learn how to start scraping TikTok Shop.

With Web Scraper API, you can scrape various types of TikTok Shop pages; below is an overview of all supported scrapers and their respective source values. The response returns the page HTML in content, in the standard response structure described in Realtime and Push-Pull.

Source
Description

tiktok_shop_search

Search page for a search term of your choice.

tiktok_shop_product

Product page of a product ID of your choice.

Any other TikTok Shop page can be scraped by passing its url alone, no source needed.

Besides the parameters listed below, you can include additional parameters such as user_agent_type, geo_location, render, and more to customize your scraping request. Read more here.

Request samples

curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "tiktok_shop_search",
        "query": "earrings"
    }'
import requests
from pprint import pprint

# Structure payload.
payload = {
    'source': 'tiktok_shop_search',
    'query': 'earrings'
}

# Get response.
response = requests.request(
    'POST',
    'https://realtime.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'),
    json=payload
)

# Instead of response with job status and results url, this will return the
# JSON response with the result.
pprint(response.json())

Request parameter values

Parameter
Description
Default Value

source

Sets the scraper.

tiktok_shop_search

query

The keyword or phrase to search for products.

-

- mandatory parameter

Product

Request samples

Request parameter values

Parameter
Description
Default Value

source

Sets the scraper.

tiktok_shop_product

product_id

The 19-digit product ID, the last part of the product page URL, e.g. shop.tiktok.com/us/pdp/pavoi-14k-gold-plated-cz-ring-stackable-hypoallergenic/1729554652423164424.

-

country

Optional storefront country, see Localization and Filtering.

United States storefront

- mandatory parameter

Localization and Filtering

TikTok Shop runs a separate storefront in each country, and the country is part of the page URL, e.g. shop.tiktok.com/gb/pdp/… for the United Kingdom. Use country to scrape a product from another country's storefront.

Parameter
Applies to
Description
Default

country

tiktok_shop_product

TikTok Shop storefront country, as a lowercase code. Available values: gb (United Kingdom), id (Indonesia), jp (Japan), my (Malaysia), ph (Philippines), th (Thailand), vn (Vietnam). Use the country of the shop the product belongs to: a product opens only in its own country's storefront. Indonesian products are served from shop-id.tokopedia.com.

United States storefront

Last updated

Was this helpful?