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 tasks to scrape Google News articles. Each task represents a news search query that will fetch matching articles from Google News.

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 google-news-search-export crawler
tasksarrayYesArray of task objects, each containing a keyword field

Task Object

FieldTypeRequiredDescription
keywordstringYesThe news search query (e.g., crab, climate change, tech news)
Use specific keywords for more targeted news results.
Configure time range and language in the squid settings to filter results.

Code Examples

curl -X POST "https://api.lobstr.io/v1/tasks" \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tasks": [
      {"keyword": "crab"},
      {"keyword": "climate change"}
    ],
    "squid": "YOUR_SQUID_HASH"
  }'

Response

200
{
  "duplicated_count": 0,
  "tasks": [
    {
      "id": "5f5ccd42b74cf18196dcb7fe14fb8030",
      "created_at": "2025-07-04T04:51:12.532884",
      "is_active": true,
      "params": {
        "keyword": "crab"
      },
      "module": 131,
      "object": "task"
    }
  ]
}