Websearch
Search Websearch
Search with Exa, Ceramic, Linkup, Tavily, Serper, OpenAI, or Perplexity and return page URLs, titles, and descriptions in one response format. Authenticate with an API key that grants websearch.execute and send Content-Type: application/json.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.websearch.search(provider="exa", query="Things to do in Salt Lake City in fall", limit=10)
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.websearch.search({
provider: "exa",
query: "Things to do in Salt Lake City in fall",
limit: 10,
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"provider": Literal["exa", "ceramic", "linkup", "tavily", "serper", "openai", "perplexity"], # required
"query": str, # required
"identity": { # optional
"id": str, # required
},
"limit": Optional[int],
"plugins": [{ # optional
"entities": List[str], # optional
"entity_thresholds": Dict[str, float], # optional
"id": Literal["pii_redaction"], # required
"language": Optional[str],
"on_failure": Optional[str],
"regions": List[str], # optional
"threshold": Optional[float],
}],
}
{
identity?: {
id: string; // required
};
limit?: number;
plugins?: {
entities?: string[];
entityThresholds?: Record<string, number>;
id: "pii_redaction"; // required
language?: string;
onFailure?: string;
regions?: string[];
threshold?: number;
}[];
provider: "exa" | "ceramic" | "linkup" | "tavily" | "serper" | "openai" | "perplexity"; // required
query: string; // required
}
Show Response
Show Response
{
"headers": Dict[str, List[str]],
"result": {
"items": [{
"description": str,
"title": str,
"url": str,
}],
"metadata": {
"latency_ms": int,
"provider": Literal["exa", "ceramic", "linkup", "tavily", "serper", "openai", "perplexity"],
"query": str,
"request_id": str,
},
},
}
{
headers: Record<string, string[]>;
result: {
items: {
description: string;
title: string;
url: string;
}[];
metadata: {
latencyMs: number;
provider: "exa" | "ceramic" | "linkup" | "tavily" | "serper" | "openai" | "perplexity";
query: string;
requestId: string;
};
};
}