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

client = Parallel(api_key="API Key")

extract = client.beta.extract(
    urls=["https://www.example.com"],
    excerpts=True,
    full_content=True
)
print(extract.results)
{
  "extract_id": "extract_8a911eb27c7a4afaa20d0d9dc98d07c0",
  "results": [
    {
      "url": "https://www.example.com",
      "excerpts": [
        "Excerpted text ..."
      ],
      "full_content": "Full content ...",
      "title": "Example Title"
    }
  ],
  "errors": [
    {
      "url": "https://www.example.com",
      "error_type": "fetch_error"
    }
  ]
}

Authorizations

x-api-key
string
header
required

Headers

parallel-beta
string
required

Body

application/json

Extract request.

urls
string[]
required
objective
string | null

If provided, focuses extracted content on the specified search objective.

search_queries
string[] | null

If provided, focuses extracted content on the specified keyword search queries.

fetch_policy
object | null

Fetch policy: determines when to return content from the cache (faster) vs fetching live content (fresher). If not provided, a dynamic policy will be used based on the search objective and url. Fetch policy.

Determines when to return content from the cache (faster) vs fetching live content (fresher).

excerpts
default:true

Include excerpts from each URL relevant to the search objective and queries. Note that if neither objective nor search_queries is provided, excerpts are redundant with full content.

full_content
default:false

Include full content from each URL. Note that if neither objective nor search_queries is provided, excerpts are redundant with full content.

Response

Successful Response

Fetch result.

extract_id
string
required

Extract request ID, e.g. extract_cad0a6d2dec046bd95ae900527d880e7

results
ExtractResult · object[]
required

Successful extract results.

errors
ExtractError · object[]
required

Extract errors: requested URLs not in the results.