Skip to main content
POST
/
v1
/
tasks
/
upload
Upload Tasks
curl --request POST \
  --url https://api.lobstr.io/v1/tasks/upload \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "squid": "<string>"
}
'
{
  "id": "<string>",
  "object": "<string>"
}

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.

This endpoint allows you to upload a file (CSV/TSV) containing multiple tasks for a specific squid. The file should contain task parameters in columns matching the crawler’s expected keys. This is ideal for bulk task creation.

Headers

Authorization
string
required
Your API authentication token. Value: Token YOUR_API_KEY
Content-Type
string
required
Must be multipart/form-data for file upload. Value: multipart/form-data

Form Data Parameters

file
file
required
CSV or TSV file containing task data. Column headers should match crawler parameter keys. Example: tasks.csv
squid
string
required
The hash ID of the squid to add tasks to. Example: "a1b2c3d4e5f6g7h8i9j0"

Response Field Explanations

id
string
Upload task identifier for tracking progress. Example: "427a7bfc54cf4ce483d83ba23425164b"
object
string
Always “task_upload”. Example: "task_upload"
Use the returned task ID with Check Upload Status to monitor the upload progress.
CSV column headers must match the crawler’s expected parameter keys (e.g., ‘url’, ‘city’, ‘activity’).
Large files may take time to process. Always check upload status before running the squid.
TSV (tab-separated) files are also supported and may be easier to work with for URLs containing commas.

Code Examples

curl -X POST "https://api.lobstr.io/v1/tasks/upload" \
  -H "Authorization: Token YOUR_API_KEY" \
  -F "file=@tasks.csv" \
  -F "squid=a1b2c3d4e5f6g7h8i9j0"

Response

200
{
  "id": "427a7bfc54cf4ce483d83ba23425164b",
  "object": "task_upload"
}