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

extract_values

Read one web page and return the values a JSON Schema asks for, such as dimensions, materials or prices. Use when you have a URL and know which fields you need. Do not use when you need the whole page text (use read_page), or when the values are spread across several sites (use research_question). Defaults to firecrawl. Set provider to choose another supported provider; Fieldwork never switches providers after an error.

POST/api/v1/tools/extract_values
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:exafirecrawlparallel
timeoutinteger

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

min 1 · max 45000
One of:
object
urlstring<uri>required

The page's full URL, including https://.

schemaobjectrequired

A JSON Schema object describing the values to return, such as {"type":"object","properties":{"width":{"type":"string"}}}.

promptstring

What to extract, in plain words, when the schema alone is not enough.

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
object
urlstring<uri>required

The page's full URL, including https://.

schemaobjectrequired

A JSON Schema object describing the values to return, such as {"type":"object","properties":{"width":{"type":"string"}}}.

promptstring

What to extract, in plain words, when the schema alone is not enough.

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
urlstring<uri>required

The page's full URL, including https://.

schemaobjectrequired

A JSON Schema object describing the values to return, such as {"type":"object","properties":{"width":{"type":"string"}}}.

promptstring

What to extract, in plain words, when the schema alone is not enough.

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
urlstring<uri>required

The page's full URL, including https://.

schemaobjectrequired

A JSON Schema object describing the values to return, such as {"type":"object","properties":{"width":{"type":"string"}}}.

promptstring

What to extract, in plain words, when the schema alone is not enough.

countrystring

Search from this country, as a two-letter ISO code such as GB.

matches ^[A-Za-z]{2}$
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
Responses
200

The provider that ran the call and its normalized result.

providerstringrequired
Allowed:exafirecrawlparallel
requestIdstringrequired
resultobjectrequired
Show properties
dataanyrequired

The values, in the shape of the schema.

fieldsobject[]

The sources the provider gave for each field.

Show properties
Array of object
citationsobject[]required
Show properties
Array of object
excerptsstring[]
titlestring
urlstringrequired
confidenceany

The provider's own confidence label or score.

fieldstringrequired
reasoningstring
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[]
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/extract_values' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "exa",
  "timeout": 1,
  "url": "http://example.com",
  "schema": {},
  "prompt": "string",
  "maxAge": 0,
  "maxCharacters": 1
}'
Response
{
  "provider": "exa",
  "requestId": "string",
  "result": {
    "data": null,
    "fields": [
      {
        "citations": [
          {
            "excerpts": [
              "string"
            ],
            "title": "string",
            "url": "string"
          }
        ],
        "confidence": null,
        "field": "string",
        "reasoning": "string"
      }
    ],
    "meta": {
      "requestId": "string",
      "usage": {
        "costUsd": 0,
        "credits": 0,
        "units": {
          "property1": 0,
          "property2": 0
        }
      },
      "warnings": [
        "string"
      ]
    },
    "truncated": [
      {
        "length": 0,
        "path": "string",
        "shown": 0
      }
    ]
  }
}

Was this page helpful?