Skip to main content
POST
/
browser
/
batches
Batch content
curl --request POST \
  --url https://api.agentfirst.dev/browser/batches \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "urls": [
    "https://guitars.com/",
    "https://cartervintage.com/",
    "https://musiccityvintageguitars.com/",
    "[Additional URLs here]"
  ],
  "difficulty": "low",
  "speed": "light",
  "device": null,
  "country": null,
  "subdivision": null,
  "city": null,
  "captcha": "rejected",
  "readiness": "load",
  "delay": null,
  "format": "markdown",
  "expiration": 0,
  "callback (planned)": "https://webhook.site/02e249f8-1faf-4fab-bcf5-78ce683e85a8"
}
'
{
  "id": "a0482596-c2ad-445a-a435-727002156a20",
  "count": 37
}

Authorizations

Authorization
string
header
required

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

Body

application/json
urls
string<uri>[]
required

The URLs of the pages to browse.

Required array length: 1 - 1000 elements
Example:
[
  "https://guitars.com/",
  "https://cartervintage.com/",
  "https://musiccityvintageguitars.com/",
  "[Additional URLs here]"
]
difficulty
enum<string>
default:low

The difficulty pool to attempt to access the URLs from.

Available options:
low,
medium,
high
Example:

"low"

speed
enum<string>
default:light

The speed to attempt to access the URLs at, where ridiculous is 30 percent faster on average than light speed.

Available options:
light,
ridiculous,
ludicrous (planned)
Example:

"light"

device
string

The name as returned by the devices resource [blocked] of the device to emulate browsing on (these names are case insensitive); device emulation is unused by default.

Example:

null

country
string

The two-letter ISO code of the country to browse from (these codes are case insensitive); a random country is used by default.

Example:

null

subdivision
string

The alphanumeric second part (proceeding the separator) of a first-level subdivision code in the (prerequisite) country to browse from (these codes are case insensitive); a random subdivision is used by default.

Example:

null

city
string

The commonly spelled name of the city in the (prerequisite) country to browse from (these names are temporarily case sensitive); a random city is used by default.

Example:

null

captcha
enum<string>
default:solved

The intended resolution of any detected captcha, where rejected results in a 403 response.

Available options:
solved,
ignored,
rejected
Example:

"rejected"

readiness
enum<string>
default:load

The standard ready event to await before snapshotting browsed content.

Available options:
load,
domcontentloaded
Example:

"load"

delay
number

The number of supplemental seconds to delay before snapshotting browsed content; no delay is used by default.

Required range: 0.1 <= x <= 10
Example:

null

format
enum<string>
default:rendered

The format to output to.

Available options:
rendered,
raw,
markdown
Example:

"markdown"

expiration
integer
default:1

The age in days of when to consider cached content expired, where 0 disables caching.

Required range: 0 <= x <= 1
Example:

0

callback (planned)
string

The HTTP or HTTPS callback URL or Amazon SQS queue URL or ARN to notify when the batch content has been retrieved; any SQS queue must grant sqs:SendMessage permission to the arn:aws:iam::180363035301:role/api-instance AWS principal.

Example:

"https://webhook.site/02e249f8-1faf-4fab-bcf5-78ce683e85a8"

Response

A job identifier and confirmation count.

id
string<uuid>
required

The identifier to retrieve the batch content with.

Example:

"a0482596-c2ad-445a-a435-727002156a20"

count
integer
required

The number of requests in the batch as confirmed by the API.

Required range: 1 <= x <= 1000
Example:

37