Check the status of a scraping job. ## Headers | Name | Type | Required | Description | | --- | --- | --- | --- | | `Authorization` | string | Yes | Bearer token authentication | ## Path Parameters | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `job_id` | string | Yes | Job identifier | ## Response **Status**: `200 OK` Returns the same structure as the synchronous scrape response, with status indicating current job state. | Field | Type | Description | | --- | --- | --- | | `job_id` | string | Unique job identifier | | `status` | string | "pending", "processing", "completed", "failed", "cancelled" | | `url` | string | The scraped URL | | `extracted_data` | array|null | Array of extracted items (null if not completed) | | `metadata` | object|null | Processing metadata (null if not completed) | | `created_at` | string | Job creation timestamp | | `completed_at` | string|null | Job completion timestamp (null if not completed) | Get Job Status ```bash curl -X GET https://api.aitronos.com/api/v1/scrape/jobs/job_abc123def456 \ -H "X-API-Key: $FREDDY_API_KEY" ``` ```python import os import requests api_key = os.environ["FREDDY_API_KEY"] job_id = "job_abc123def456" response = requests.get( f"https://api.aitronos.com/api/v1/scrape/jobs/{job_id}", headers={"X-API-Key": api_key} ) data = response.json() print(f"Status: {data['status']}") if data['status'] == 'completed': print(f"Extracted {len(data['extracted_data'])} items") ``` ```javascript const axios = require('axios'); const apiKey = process.env.FREDDY_API_KEY; const jobId = 'job_abc123def456'; axios.get(`https://api.aitronos.com/api/v1/scrape/jobs/${jobId}`, { headers: { 'X-API-Key': apiKey } }) .then(response => { const data = response.data; console.log(`Status: ${data.status}`); if (data.status === 'completed') { console.log(`Extracted ${data.extracted_data.length} items`); } }); ``` **Response** `200 OK` ```json { "job_id": "job_abc123def456", "status": "completed", "url": "https://example.com/products", "extracted_data": [ { "title": "Product Name", "price": 29.99 } ], "metadata": { "processing_time": 2.5, "engine_used": "browser", "llm_calls": 1, "cache_hit": false }, "created_at": "2024-12-16T10:30:00Z", "completed_at": "2024-12-16T10:30:02Z" } ```