← Back to Context.dev
POST/web/search

Search the Web

Performs an intelligent web search. Costs 1 credit per returned result.

Context.dev·$0.03 per call

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "context-dev", path: "/web/search", body: { "query": "example" } }); console.log(output);

Body parameters

queryrequired
string

The search query

include_domains
array

Only include results from these domains (e.g. ["arxiv.org", "github.com"])

exclude_domains
array

Exclude results from these domains (e.g. ["pinterest.com", "reddit.com"])

freshness
string

Filter results by recency

queryFanout
boolean

When true, uses an LLM to expand the query into multiple diverse search queries that are executed in parallel, improving recall by covering different angles and phrasings of the original intent

Response

query
string
results.0.url
string
results.0.title
string
results.0.markdown.code
string
results.0.markdown.markdown
null
results.0.relevance
string
results.0.description
string
key_metadata.credits_consumed
number
key_metadata.credits_remaining
number
    Orthogonal - Giving AI agents the tools they need.