核心版和高级版套餐已停止销售。请考虑迁移到一体化网络爬虫 API;请点击此处查看指南.
tiktok_shop_search 模板用于从 TikTok Shop 获取搜索结果页面。
输入参数
TikTok Shop 搜索模板可用的请求参数:| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
target | string | ✅ | 目标类型必须设置为 tiktok_shop_search。 |
query | string | ✅ | 搜索查询。 |
country | string | 当您想要检索特定于英国的结果时,将此参数设置为 gb。 | |
headless | string | html 值启用 JavaScript 渲染。了解更多。png 值启用屏幕截图响应。了解更多。 | |
device_type | string | 指定设备类型和浏览器。了解更多。 | |
xhr | boolean | 设置为 true 以检索 XHR 和 fetch 请求列表。了解更多。默认值为 false。 | |
markdown | boolean | 设置为 true 以接收 Markdown 响应。了解更多。默认值为 false。 |
请求示例
# update 'TOKEN VALUE' with your authorization token
curl --request 'POST' \
--url 'https://scraper-api.decodo.com/v2/scrape' \
--header 'Accept: application/json' \
--header 'Authorization: Basic TOKEN VALUE' \
--header 'Content-Type: application/json' \
--data '
{
"target": "tiktok_shop_search",
"query": "hoodie",
"headless": "html"
}
'
const scrape = async() => {
const response = await fetch("https://scraper-api.decodo.com/v2/scrape", {
method: "POST",
body: JSON.stringify({
"target": "tiktok_shop_search",
"query": "hoodie",
"headless": "html"
}),
headers: {
"Content-Type": "application/json",
"Authorization": "Basic TOKEN VALUE" // update with your authorization token
},
}).catch(error => console.log(error));
console.log(await response.json())
}
scrape()
import requests
url = "https://scraper-api.decodo.com/v2/scrape"
payload = {
"target": "tiktok_shop_search",
"query": "hoodie",
"headless": "html"
}
headers = {
"accept": "application/json",
"content-type": "application/json",
"authorization": "Basic TOKEN VALUE" # update with your authorization token
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
输出
响应示例
import requests
url = "https://scraper-api.decodo.com/v2/scrape"
payload = {
"target": "tiktok_shop_search",
"query": "hoodie",
"headless": "html"
}
headers = {
"accept": "application/json",
"content-type": "application/json",
"authorization": "Basic TOKEN VALUE" # update with your authorization token
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
支持
需要帮助或只是想打个招呼?我们的支持团队全天候为您服务。
您也可以随时通过电子邮件 support@decodo.com 联系我们。
您也可以随时通过电子邮件 support@decodo.com 联系我们。
反馈
找不到您要找的内容?请求一篇文章!
有反馈意见?分享您对我们如何改进的想法。
有反馈意见?分享您对我们如何改进的想法。