from parallel import Parallel
client = Parallel()
search = client.beta.search(
objective="Find latest information about Parallel Web Systems. Focus on new product releases, benchmarks, or company announcements.",
)
print(search.results)import Parallel from "parallel-web";
const client = new Parallel();
const search = await client.beta.search({
objective: "Find latest information about Parallel Web Systems. Focus on new product releases, benchmarks, or company announcements.",
});
console.log(search.results);HttpResponse<String> response = Unirest.post("https://api.parallel.ai/v1beta/search")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"one-shot\",\n \"objective\": \"<string>\",\n \"search_queries\": [\n \"<string>\"\n ],\n \"max_results\": 123,\n \"max_chars_per_result\": 123,\n \"excerpts\": {\n \"max_chars_per_result\": 123,\n \"max_chars_total\": 123\n },\n \"location\": \"us\",\n \"source_policy\": {\n \"include_domains\": [\n \"wikipedia.org\",\n \"docs.python.org/3\",\n \".edu\"\n ],\n \"exclude_domains\": [\n \"reddit.com\",\n \"youtube.com/shorts\",\n \".ai\"\n ],\n \"after_date\": \"2024-01-01\"\n },\n \"fetch_policy\": {\n \"max_age_seconds\": 86400,\n \"timeout_seconds\": 60,\n \"disable_cache_fallback\": false\n },\n \"session_id\": \"<string>\",\n \"client_model\": \"claude-opus-4-7\"\n}")
.asString();curl --request POST \
--url https://api.parallel.ai/v1beta/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"objective": "Find latest information about Parallel Web Systems. Focus on new product releases, benchmarks, or company announcements."
}'{
"search_id": "search_fcb2b4f3c75e418687bccaa1a8381331",
"results": [
{
"url": "https://www.example.com",
"title": "Sample webpage title",
"publish_date": "2024-01-15",
"excerpts": [
"Sample excerpt 1",
"Sample excerpt 2"
]
}
]
}{
"type": "error",
"error": {
"ref_id": "search_fcb2b4f3c75e418687bccaa1a8381331",
"message": "Request validation error"
}
}Search
Searches the web.
from parallel import Parallel
client = Parallel()
search = client.beta.search(
objective="Find latest information about Parallel Web Systems. Focus on new product releases, benchmarks, or company announcements.",
)
print(search.results)import Parallel from "parallel-web";
const client = new Parallel();
const search = await client.beta.search({
objective: "Find latest information about Parallel Web Systems. Focus on new product releases, benchmarks, or company announcements.",
});
console.log(search.results);HttpResponse<String> response = Unirest.post("https://api.parallel.ai/v1beta/search")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"one-shot\",\n \"objective\": \"<string>\",\n \"search_queries\": [\n \"<string>\"\n ],\n \"max_results\": 123,\n \"max_chars_per_result\": 123,\n \"excerpts\": {\n \"max_chars_per_result\": 123,\n \"max_chars_total\": 123\n },\n \"location\": \"us\",\n \"source_policy\": {\n \"include_domains\": [\n \"wikipedia.org\",\n \"docs.python.org/3\",\n \".edu\"\n ],\n \"exclude_domains\": [\n \"reddit.com\",\n \"youtube.com/shorts\",\n \".ai\"\n ],\n \"after_date\": \"2024-01-01\"\n },\n \"fetch_policy\": {\n \"max_age_seconds\": 86400,\n \"timeout_seconds\": 60,\n \"disable_cache_fallback\": false\n },\n \"session_id\": \"<string>\",\n \"client_model\": \"claude-opus-4-7\"\n}")
.asString();curl --request POST \
--url https://api.parallel.ai/v1beta/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"objective": "Find latest information about Parallel Web Systems. Focus on new product releases, benchmarks, or company announcements."
}'{
"search_id": "search_fcb2b4f3c75e418687bccaa1a8381331",
"results": [
{
"url": "https://www.example.com",
"title": "Sample webpage title",
"publish_date": "2024-01-15",
"excerpts": [
"Sample excerpt 1",
"Sample excerpt 2"
]
}
]
}{
"type": "error",
"error": {
"ref_id": "search_fcb2b4f3c75e418687bccaa1a8381331",
"message": "Request validation error"
}
}Authorizations
Headers
Body
Request to Search API.
Presets default values for parameters for different use cases.
one-shotreturns more comprehensive results and longer excerpts to answer questions from a single responseagenticreturns more concise, token-efficient results for use in an agentic loopfasttrades some quality for lower latency, with best results when used with concise and high-quality objective and keyword queries
one-shot, agentic, fast 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.
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.
DEPRECATED: use mode instead.
base, pro Upper bound on the number of results to return. Defaults to 10 if not provided.
DEPRECATED: Use excerpts.max_chars_per_result instead.
Optional settings to configure excerpt generation.
Show child attributes
Show child attributes
ISO 3166-1 alpha-2 country code for geo-targeted search results.
"us"
Optional source policy governing included and excluded domains, paths, and dates in search results.
Show child attributes
Show child attributes
Fetch policy: determines when to return cached content from the index (faster) vs fetching live content (fresher). Default is to disable live fetch and return cached content from the index.
Show child attributes
Show child attributes
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.
1000The model generating this request and consuming the results. Enables optimizations and tailors default settings for the model's capabilities.
"claude-opus-4-7"
Response
Successful Response
Output for the Search API.
Search ID. Example: search_cad0a6d2dec046bd95ae900527d880e7
A list of WebSearchResult objects, ordered by decreasing relevance.
Show child attributes
Show child attributes
Warnings for the search request, if any.
Show child attributes
Show child attributes
Usage metrics for the search request.
Show child attributes
Show child attributes