Skip to main content

Documentation Index

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

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

Scenario

You want to extract a small structured record from a single product URL and verify that your API integration is working end to end.

Architecture

StepAPI call
1POST /api/v1/tasks
2POST /api/v1/tasks/:id/run
3GET /api/v1/executions/:id
4GET /api/v1/executions/:id/results/export

Step 1: create the task

curl -X POST "$TITAN_API_URL/api/v1/tasks" \
  -H "Authorization: Bearer $TITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Single URL test",
    "urls": ["https://example.com/product/123"],
    "objective": "Extract the product name and price",
    "output_schema": {
      "type": "object",
      "properties": {
        "product_name": { "type": "string" },
        "price": { "type": "string" }
      }
    },
    "execution_type": "single"
  }'

Step 2: run the task

curl -X POST "$TITAN_API_URL/api/v1/tasks/$TASK_ID/run" \
  -H "Authorization: Bearer $TITAN_TOKEN"

Step 3: poll for completion

curl "$TITAN_API_URL/api/v1/executions/$EXECUTION_ID" \
  -H "Authorization: Bearer $TITAN_TOKEN"
Continue polling until the execution reaches completed.

Step 4: export the result

curl "$TITAN_API_URL/api/v1/executions/$EXECUTION_ID/results/export" \
  -H "Authorization: Bearer $TITAN_TOKEN"

Why this example matters

This flow validates the full user path:
  • Authentication
  • Task creation
  • Execution lifecycle
  • Result retrieval
It is the best first test before moving to scheduled or media-aware tasks.

Next steps