Skip to main content
POST
/
v1
/
tasks
Add Tasks
curl --request POST \
  --url https://api.lobstr.io/v1/tasks \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>'

Documentation Index

Fetch the complete documentation index at: https://docs.lobstr.io/llms.txt

Use this file to discover all available pages before exploring further.

Add keyword-based search tasks to your squid. The scraper will extract top performing ads from TikTok’s Creative Center based on your search terms.

Headers

Authorization
string
required
Your API authentication token. Value: Token YOUR_API_KEY
Content-Type
string
required
Request body format. Value: application/json

Request Body

FieldTypeRequiredDescription
squidstringYesHash of your squid configured with the tiktok-top-ads-scraper crawler
tasksarrayYesArray of task objects, each containing a keyword field

Task Fields

FieldTypeRequiredDescription
keywordstringYesSearch term you want to get TikTok Ads from (e.g., “fitness”, “skincare”, “cooking”)
Use specific keywords related to your industry or niche for more relevant ad results.
You can add multiple keywords in a single request to analyze ads across different topics.
Results are retrieved from TikTok’s Creative Center Top Ads library.

Code Examples

curl -X POST "https://api.lobstr.io/api/v2/squid/YOUR_SQUID_ID/task" \
  -H "Authorization: Token YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "keyword": "fitness"
  }'

Response

200
{
  "id": "task_abc123",
  "squid_id": "YOUR_SQUID_ID",
  "status": "pending",
  "keyword": "fitness",
  "created_at": "2024-01-15T10:30:00Z"
}