Skip to content
Fieldwork
Esc
↑↓navigate↵open⌘Jpreview

read_pages

Read several web pages in one call and return each page’s title and text as Markdown. URLs that could not be read come back in failed; the call still succeeds. Use when you have a list of URLs. Do not use for one page (use read_page) or to follow links across a site (use crawl_site). Defaults to firecrawl. Set provider to choose another supported provider; Fieldwork never switches providers after an error.

POST/api/v1/tools/read_pages
Authorization
AuthorizationBearer token · headerrequired

A Fieldwork gateway key, issued per agent by the operator. Send it as Authorization: Bearer <key>.

Request body
requiredapplication/json
providerstring
Allowed:exafirecrawltavilyparallel
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
One of:
object
urlsstring<uri>[]required

The pages' full URLs, including https://.

min items 1
querystring

Also return the passages of each page that answer this, as excerpts.

maxAgeinteger

Use a cached copy of the page if it is no older than this many seconds. 0 always fetches a fresh copy.

min 0
resumestring

The jobId from an earlier call's error, when that call timed out or was cancelled. Waits for that job instead of starting and paying for a new one.

maxCharactersinteger

Shared long-text budget for this call; defaults to 20000. Never sent to the provider.

min 1 · max 200000
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
object
urlsstring<uri>[]required

The pages' full URLs, including https://.

min items 1
querystring

Also return the passages of each page that answer this, as excerpts.

maxCharsPerResultinteger

Cap on the characters of passages or excerpts returned for each result.

min 1
maxContentCharsinteger

Cap on the characters of full page text returned as markdown for each page.

min 1
maxAgeinteger

Use a cached copy of the page if it is no older than this many seconds. 0 always fetches a fresh copy.

min 0
maxCharactersinteger

Shared long-text budget for this call; defaults to 20000. Never sent to the provider.

min 1 · max 200000
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
providerstringrequired
object
urlsstring<uri>[]required

The pages' full URLs, including https://.

min items 1
querystring

Also return the passages of each page that answer this, as excerpts.

maxAgeinteger

Use a cached copy of the page if it is no older than this many seconds. 0 always fetches a fresh copy.

min 0
resumestring

The jobId from an earlier call's error, when that call timed out or was cancelled. Waits for that job instead of starting and paying for a new one.

maxCharactersinteger

Shared long-text budget for this call; defaults to 20000. Never sent to the provider.

min 1 · max 200000
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
providerstringrequired
object
urlsstring<uri>[]required

The pages' full URLs, including https://.

min items 1
querystring

Also return the passages of each page that answer this, as excerpts.

chunksPerSourceinteger

Passages to return per page, 1 to 5. Requires query.

min 1 · max 5
maxCharactersinteger

Shared long-text budget for this call; defaults to 20000. Never sent to the provider.

min 1 · max 200000
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
providerstringrequired
object
urlsstring<uri>[]required

The pages' full URLs, including https://.

min items 1
querystring

Also return the passages of each page that answer this, as excerpts.

maxCharsPerResultinteger

Cap on the characters of passages or excerpts returned for each result.

min 1
maxCharsTotalinteger

Cap on the characters of passages or excerpts returned across all results.

min 1
maxContentCharsinteger

Cap on the characters of full page text returned as markdown for each page.

min 1
maxAgeinteger

Use a cached copy of the page if it is no older than this many seconds. At least 600: Parallel cannot always fetch fresh.

min 600
maxCharactersinteger

Shared long-text budget for this call; defaults to 20000. Never sent to the provider.

min 1 · max 200000
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
providerstringrequired
Responses
200

The provider that ran the call and its normalized result.

providerstringrequired
Allowed:exafirecrawltavilyparallel
requestIdstringrequired
resultobjectrequired
Show properties
failedobject[]required
Show properties
Array of object
errorstringrequired
urlstringrequired
idstring
metaobject

Request details from the provider: its request id, what it charged and any warnings.

Show properties
requestIdstring
usageobject
Show properties
costUsdnumber
creditsnumber
unitsobject
warningsstring[]
pagesobject[]required
Show properties
Array of object
authorstring
descriptionstring
excerptsstring[]
faviconstring
htmlstring
imagestring
imagesstring[]
languagestring
linksstring[]
markdownstring
metaobject

Request details from the provider: its request id, what it charged and any warnings.

Show properties
requestIdstring
usageobject
Show properties
costUsdnumber
creditsnumber
unitsobject
warningsstring[]
publishedAtstring
rawHtmlstring
screenshotstring
statusCodenumber
summarystring
titlestring
urlstringrequired
truncatedobject[]

One entry for each cut text field; absent when nothing was cut.

Show properties
Array of object
lengthintegerrequired

Original character length.

min 0
pathstringrequired
shownintegerrequired

Characters shown before the inline cut note.

min 0
default

A refusal or a failed call. Branch on error.code; never parse the message.

errorobjectrequired
Show properties
codestringrequired
Allowed:AbortedInvalidRequestJobFailedNotAFileNotFoundProviderErrorRateLimitedTimeoutTooLargeUnauthorizedUnsupported
jobIdstring

A job that was already started. Pass it as resume instead of repeating the call.

messagestringrequired
providerstring
retryAfternumber

Seconds to wait.

retryablebooleanrequired

Whether repeating the same call can succeed.

requestIdstring
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST '/api/v1/tools/read_pages' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "exa",
  "timeout": 1,
  "urls": [
    "http://example.com"
  ],
  "query": "string",
  "maxAge": 0,
  "resume": "string",
  "maxCharacters": 1
}'
Response
{
  "provider": "exa",
  "requestId": "string",
  "result": {
    "failed": [
      {
        "error": "string",
        "url": "string"
      }
    ],
    "id": "string",
    "meta": {
      "requestId": "string",
      "usage": {
        "costUsd": 0,
        "credits": 0,
        "units": {
          "property1": 0,
          "property2": 0
        }
      },
      "warnings": [
        "string"
      ]
    },
    "pages": [
      {
        "author": "string",
        "description": "string",
        "excerpts": [
          "string"
        ],
        "favicon": "string",
        "html": "string",
        "image": "string",
        "images": [
          "string"
        ],
        "language": "string",
        "links": [
          "string"
        ],
        "markdown": "string",
        "meta": {
          "requestId": "string",
          "usage": {
            "costUsd": 0,
            "credits": 0,
            "units": {
              "property1": 0,
              "property2": 0
            }
          },
          "warnings": [
            "string"
          ]
        },
        "publishedAt": "string",
        "rawHtml": "string",
        "screenshot": "string",
        "statusCode": 0,
        "summary": "string",
        "title": "string",
        "url": "string"
      }
    ],
    "truncated": [
      {
        "length": 0,
        "path": "string",
        "shown": 0
      }
    ]
  }
}

Was this page helpful?