Skip to main content

Jobs API

Monitor and manage your scraping jobs with real-time status updates.

List Jobs

Retrieve all your scraping jobs with filtering and pagination:
curl -X GET "https://api.whizo.ai/v1/jobs?status=completed&limit=50" \
  -H "Authorization: Bearer YOUR_API_KEY"

Get Job Details

Fetch detailed information about a specific job:
curl -X GET "https://api.whizo.ai/v1/jobs/{jobId}" \
  -H "Authorization: Bearer YOUR_API_KEY"

Cancel Job

Stop a running job before completion:
curl -X DELETE "https://api.whizo.ai/v1/jobs/{jobId}" \
  -H "Authorization: Bearer YOUR_API_KEY"

Job Status

Jobs progress through these states:
StatusDescription
pendingJob queued for processing
runningActively scraping content
completedSuccessfully finished
failedEncountered an error
cancelledManually stopped

Response Format

{
  "success": true,
  "data": {
    "id": "job_abc123",
    "url": "https://example.com",
    "status": "completed",
    "progress": 100,
    "creditsUsed": 3,
    "processingTime": 1205,
    "result": {
      "content": "Scraped content...",
      "metadata": {
        "title": "Example Page",
        "description": "Page description"
      }
    },
    "createdAt": "2025-01-18T10:00:00Z",
    "completedAt": "2025-01-18T10:00:05Z"
  }
}

Real-time Updates

Use WebSocket connection for live job progress:
const ws = new WebSocket('wss://api.whizo.ai/v1/jobs/job_abc123/stream');
ws.onmessage = (event) => {
  const update = JSON.parse(event.data);
  console.log('Job progress:', update.progress);
};