Python
from parallel import Parallel
client = Parallel()
search = client.search(
objective="Find latest information about Parallel Web Systems. Focus on new product releases, benchmarks, or company announcements.",
search_queries=["Parallel Web Systems products", "Parallel Web Systems announcements"],
)
print(search.results)import Parallel from "parallel-web";
const client = new Parallel();
const search = await client.search({
objective: "Find latest information about Parallel Web Systems. Focus on new product releases, benchmarks, or company announcements.",
search_queries: ["Parallel Web Systems products", "Parallel Web Systems announcements"],
});
console.log(search.results);curl --request POST \
--url https://api.parallel.ai/v1/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_queries": ["Parallel Web Systems products", "Parallel Web Systems 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"
]
}
],
"session_id": "session_fcb2b4f3c75e418687bccaa1a8381331"
}{
"type": "error",
"error": {
"ref_id": "search_fcb2b4f3c75e418687bccaa1a8381331",
"message": "Request validation error"
}
}Search
Search
Searches the web.
POST
/
v1
/
search
Python
from parallel import Parallel
client = Parallel()
search = client.search(
objective="Find latest information about Parallel Web Systems. Focus on new product releases, benchmarks, or company announcements.",
search_queries=["Parallel Web Systems products", "Parallel Web Systems announcements"],
)
print(search.results)import Parallel from "parallel-web";
const client = new Parallel();
const search = await client.search({
objective: "Find latest information about Parallel Web Systems. Focus on new product releases, benchmarks, or company announcements.",
search_queries: ["Parallel Web Systems products", "Parallel Web Systems announcements"],
});
console.log(search.results);curl --request POST \
--url https://api.parallel.ai/v1/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_queries": ["Parallel Web Systems products", "Parallel Web Systems 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"
]
}
],
"session_id": "session_fcb2b4f3c75e418687bccaa1a8381331"
}{
"type": "error",
"error": {
"ref_id": "search_fcb2b4f3c75e418687bccaa1a8381331",
"message": "Request validation error"
}
}You can also send this request to the EU base URL
https://eu.parallel.ai, which supports only basic mode. See EU Data Residency.Body
application/json
Search request.
Search mode preset: supported values are turbo, fast, basic, and advanced. Turbo mode is optimized for the fastest responses. Use Fast mode for high quality search within a 1-second latency budget. Basic mode offers low latency and works best with 2-3 high-quality search_queries. Advanced mode provides higher quality with more advanced retrieval and compression. Defaults to advanced when omitted.
Available options:
turbo, fast, basic, advanced Response
Successful Response
Search response.