Skip to main content
POST
/
v1
/
extract
Python
from parallel import Parallel

client = Parallel()

extract = client.extract(
    urls=["https://www.example.com"],
    objective="Summarize the page",
)
print(extract.results)
{
  "extract_id": "extract_8a911eb27c7a4afaa20d0d9dc98d07c0",
  "results": [
    {
      "url": "https://www.example.com",
      "title": "Example Title",
      "excerpts": [
        "Excerpted text ..."
      ],
      "full_content": "Full content ..."
    }
  ],
  "errors": [
    {
      "url": "https://www.example.com",
      "error_type": "fetch_error",
      "http_status_code": 500,
      "content": "Error fetching content from https://www.example.com"
    }
  ],
  "session_id": "session_8a911eb27c7a4afaa20d0d9dc98d07c0"
}

Authorizations

x-api-key
string
header
required

Body

application/json

Extract request.

urls
string[]
required

URLs to extract content from. Up to 20 URLs.

objective
string | null

As in SearchRequest, a natural-language description of the underlying question or goal driving the request. Used together with search_queries to focus excerpts on the most relevant content.

search_queries
string[] | null

Optional keyword search queries, as in SearchRequest. Used together with objective to focus excerpts on the most relevant content.

max_chars_total
integer | null

Upper bound on total characters across excerpts from all extracted results.

session_id
string | null

Session identifier to track calls across separate search and extract calls, to be used as part of a larger task. Specifying it may give better contextual results for subsequent API calls.

Maximum string length: 1000
client_model
string | null

The model generating this request and consuming the results. Enables optimizations and tailors default settings for the model's capabilities.

Example:

"claude-opus-4-7"

advanced_settings
AdvancedExtractSettings · object

Advanced configuration for fetch policy, excerpt settings, and full content settings. May impact result quality and latency unless used carefully. When omitted, excerpts are enabled and full content is disabled by default.

Response

Successful Response

Extract response.

extract_id
string
required

Extract request ID, e.g. extract_cad0a6d2dec046bd95ae900527d880e7

results
V1ExtractResult · object[]
required

Successful extract results.

errors
ExtractError · object[]
required

Extract errors: requested URLs not in the results.

session_id
string
required

Session identifier. Echoed back from the request if provided, otherwise generated by the server. Should be passed to future search and extract calls made by the agent as part of the same larger task.

Example:

"session_8a911eb27c7a4afaa20d0d9dc98d07c0"

warnings
Warning · object[] | null

Warnings for the extract request, if any.

usage
UsageItem · object[] | null

Usage metrics for the extract request.