Skip to main content
POST
/
v1
/
batches
Start a new batch
curl --request POST \
  --url https://api.olostep.com/v1/batches \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "items": [
    {
      "custom_id": "<string>",
      "url": "<string>"
    }
  ],
  "country": "<string>",
  "parser": {
    "id": "<string>"
  },
  "links_on_page": {
    "absolute_links": true,
    "include_links": [
      "<string>"
    ],
    "exclude_links": [
      "<string>"
    ]
  }
}'
{
  "id": "<string>",
  "object": "<string>",
  "status": "<string>",
  "created": 123,
  "total_urls": 123,
  "completed_urls": 123,
  "parser": "<string>",
  "country": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
items
object[]
required

Array of items to be processed in the batch.

country
string

Country for the batch execution. Provide in ISO 3166-1 alpha-2 codes like US(USA), IN(India), etc

parser
object

You can use this parameter to specify the parser to use. Parsers are useful to extract structured content from web pages. Olostep has a few parsers built in for most common web pages, and you can also create your own parsers.

Get all the links present on each page in the batch.

Response

Batch started successfully.

id
string

Batch ID

object
string

The kind of object. "batch" for this endpoint.

status
string

in_progress or completed

created
number

Created epoch

total_urls
number

Count of URLs in the batch

completed_urls
number

Count of completed URLs

parser
string
country
string
I