POST
/
v1beta
/
search
Python
from parallel import Parallel

client = Parallel(api_key="API Key")

search = client.beta.search(
    objective="What was the GDP of France in 2023?",
    processor="base"
)
print(search.results)
{
  "search_id": "search_fcb2b4f3-c75e-4186-87bc-caa1a8381331",
  "results": [
    {
      "url": "https://www.example.com",
      "title": "Sample webpage title",
      "excerpts": [
        "Sample excerpt 1",
        "Sample excerpt 2"
      ]
    }
  ]
}

Authorizations

x-api-key
string
header
required

Body

application/json

Base class for search queries.

objective
string | null

Natural-language description of what the web search is trying to find. May include guidance about preferred sources or freshness. At least one of objective or search_queries must be provided.

search_queries
string[] | null

Optional list of traditional keyword search queries to guide the search. May contain search operators. At least one of objective or search_queries must be provided.

processor
enum<string>
default:base

Search processor.

Available options:
base,
pro
max_results
integer | null
default:10

Upper bound on the number of results to return. May be limited by the processor. Defaults to 10 if not provided.

max_chars_per_result
integer | null

Upper bound on the number of characters to include in excerpts for each search result.

source_policy
object | null

Optional source policy governing preferred and disallowed domains in search results. Source policy for web search results.

This policy governs which sources are allowed/disallowed in results.

Response

Successful Response

Output for the Search API.

search_id
string
required

Search ID. Example: search_cad0a6d2-dec0-46bd-95ae-900527d880e7

results
WebSearchResult · object[]
required

A list of WebSearchResult objects, ordered by decreasing relevance.