Skip to main content
GET
/
v1
/
batches-airops
/
{batch_id}
/
items
Obtenir les éléments du lot AirOps
curl --request GET \
  --url https://api.olostep.com/v1/batches-airops/{batch_id}/items \
  --header 'Authorization: Bearer <token>'
{
  "batch_id": "batch_abc123xyz",
  "completed_at": "2024-01-15T12:30:00.000Z",
  "status": "completed",
  "counts": {
    "total": 3,
    "succeeded": 2,
    "failed": 1
  },
  "items": [
    {
      "custom_id": "post-1",
      "url": "https://example.com/blog/post-1",
      "status": "completed",
      "page_type": "informational_article",
      "author": "John Doe",
      "date_published": "2024-01-15",
      "date_modified": null,
      "brand_mentions": [
        "Acme Corp"
      ]
    },
    {
      "custom_id": "post-2",
      "url": "https://example.com/pricing",
      "status": "completed",
      "page_type": "pricing_page",
      "author": null,
      "date_published": null,
      "date_modified": null,
      "brand_mentions": []
    },
    {
      "custom_id": "post-3",
      "url": "https://example.com/broken",
      "status": "failed",
      "failed_stage": "scraping",
      "error": {
        "code": "SCRAPE_FAILED",
        "message": "URL failed to scrape"
      }
    }
  ]
}

Overview

Returns all items in the batch with their extracted metadata. Items include both successful extractions and failures from any stage.
This endpoint only returns complete results when the batch status is "completed". If the batch is still processing, you’ll receive an empty items array with a message.

Response Structure

batch_id
string
The batch identifier.
completed_at
string
ISO 8601 timestamp when the batch completed.
status
string
Batch status: "completed" or "in_progress".
counts
object
Summary counts:
  • total - Total items in batch
  • succeeded - Successfully processed
  • failed - Failed at any stage
items
array
Array of all items with their results.

Item Schema

Successful Items

Completed items have extracted fields at the root level:
{
  "custom_id": "post-1",
  "url": "https://example.com/blog/post-1",
  "status": "completed",
  "page_type": "informational_article",
  "author": "John Doe",
  "date_published": "2024-01-15",
  "date_modified": null,
  "brand_mentions": ["Acme Corp", "TechBrand"]
}
FieldTypeDescription
custom_idstringYour identifier from the request
urlstringThe scraped URL
statusstring"completed" for successful items
page_typestringClassified page type (see Overview)
authorstring | nullAuthor of the content
date_publishedstring | nullPublication date (ISO 8601 when available)
date_modifiedstring | nullLast modification date
brand_mentionsarrayBrands from your input list found on the page

Failed Items

Items that failed during any stage have an error structure:
{
  "custom_id": "post-failed",
  "url": "https://example.com/broken-page",
  "status": "failed",
  "failed_stage": "scraping",
  "error": {
    "code": "SCRAPE_FAILED",
    "message": "Connection timeout after 30s"
  }
}
FieldTypeDescription
statusstring"failed" for failed items
failed_stagestringStage where failure occurred: scraping, analyzing, or enriching
errorobjectError details with code and message

Extraction Sources

Fields are extracted using multiple methods in priority order:
  1. Classifier - URL pattern analysis (instant)
  2. Parser - Structured metadata extraction
  3. LLM - AI-powered extraction for missing fields

Example Response

Completed Batch

{
  "batch_id": "batch_abc123xyz",
  "completed_at": "2024-01-15T12:30:00.000Z",
  "status": "completed",
  "counts": {
    "total": 100,
    "succeeded": 98,
    "failed": 2
  },
  "items": [
    {
      "custom_id": "post-1",
      "url": "https://example.com/blog/post-1",
      "status": "completed",
      "page_type": "informational_article",
      "author": "John Doe",
      "date_published": "2024-01-15",
      "date_modified": null,
      "brand_mentions": ["OpenAI", "Google"]
    },
    {
      "custom_id": "post-2",
      "url": "https://example.com/pricing",
      "status": "completed",
      "page_type": "pricing_page",
      "author": null,
      "date_published": null,
      "date_modified": null,
      "brand_mentions": []
    },
    {
      "custom_id": "post-3",
      "url": "https://example.com/broken",
      "status": "failed",
      "failed_stage": "scraping",
      "error": {
        "code": "SCRAPE_FAILED",
        "message": "URL failed to scrape"
      }
    }
  ]
}

In-Progress Batch

{
  "batch_id": "batch_abc123xyz",
  "status": "in_progress",
  "items": [],
  "message": "Batch is still processing. Items will be available when status is \"completed\"."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

batch_id
string
required

L'ID du lot pour lequel récupérer les éléments.

Response

Éléments du lot récupérés avec succès.

batch_id
string

L'identifiant du lot.

completed_at
string

Horodatage ISO 8601 lorsque le lot est terminé.

status
enum<string>

Statut du lot.

Available options:
completed,
in_progress
counts
object
items
object[]
message
string

Message de statut (présent lorsque le lot est encore en cours de traitement).