Get progress information for a batch processing operation. ## Headers | Name | Type | Required | Description | | --- | --- | --- | --- | | `Authorization` | string | Yes | Bearer token authentication | ## Path Parameters | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `batch_id` | string | Yes | Batch identifier | ## Response **Status**: `200 OK` | Field | Type | Description | | --- | --- | --- | | `success` | boolean | Always true for successful requests | | `data` | object | Batch progress data | ### Data Object | Field | Type | Description | | --- | --- | --- | | `batch_id` | string | Batch identifier | | `total_urls` | integer | Total number of URLs in batch | | `completed` | integer | Number of completed jobs | | `failed` | integer | Number of failed jobs | | `pending` | integer | Number of pending jobs | | `total_items_extracted` | integer | Total items extracted across all jobs | | `estimated_completion` | string | Estimated completion time (ISO 8601) | | `jobs` | array | Array of job status objects | ### Job Status Object | Field | Type | Description | | --- | --- | --- | | `job_id` | string | Job identifier | | `url` | string | Target URL | | `status` | string | Job status | | `items_extracted` | integer | Number of items extracted | Get Batch Progress ```bash curl -X GET https://api.aitronos.com/api/v1/scrape/batch/batch_xyz789/progress \ -H "X-API-Key: $FREDDY_API_KEY" ``` ```python import os import requests api_key = os.environ["FREDDY_API_KEY"] batch_id = "batch_xyz789" response = requests.get( f"https://api.aitronos.com/api/v1/scrape/batch/{batch_id}/progress", headers={"X-API-Key": api_key} ) data = response.json()['data'] print(f"Progress: {data['completed']}/{data['total_urls']} completed") print(f"Total items: {data['total_items_extracted']}") ``` ```javascript const axios = require('axios'); const apiKey = process.env.FREDDY_API_KEY; const batchId = 'batch_xyz789'; axios.get(`https://api.aitronos.com/api/v1/scrape/batch/${batchId}/progress`, { headers: { 'X-API-Key': apiKey } }) .then(response => { const data = response.data.data; console.log(`Progress: ${data.completed}/${data.total_urls} completed`); console.log(`Total items: ${data.total_items_extracted}`); }); ``` **Response** `200 OK` ```json { "success": true, "data": { "batch_id": "batch_xyz789", "total_urls": 10, "completed": 7, "failed": 1, "pending": 2, "total_items_extracted": 245, "estimated_completion": "2024-12-16T10:35:00Z", "jobs": [ { "job_id": "job_abc123", "url": "https://example.com/page1", "status": "completed", "items_extracted": 25 } ] } } ```