PRODUCT / WEB SEARCH API

The web, in
your agent’s
toolkit.

A model can reason. Search gives it something new to reason with. Connect your agent to useful sources and context from the web.

Free Plan · All features included
FROM QUESTION TO CONTEXT
01 / QUERY

How do AI agents
search the web?

02 / SOURCEEXAMPLE
Web Search API docs.langsearch.com

Find information beyond a model’s training data. Return source links and context in a structured response.

urltextdatePublished
03 / YOUR AGENTReady to reason.
MADE FOR WHAT HAPPENS NEXT

Beyond a list of links.
Context you can use.

Give your application the pieces it needs to retrieve, reference and reason.

01 / TRACE

Keep the source in sight.

Original URLs and page titles travel with the results, so your application can cite sources and people can follow them.

02 / READ

Get the short and the long.

Use snippets for a source preview, or enable contents.text for full webpage text with a per-result character limit. Both are included in the Free Plan.

03 / BUILD

Keep control of the answer.

Structured JSON fits into your retrieval pipeline. Your application chooses the model, the prompt and what to do next.

Explore the response schema
YOUR REQUEST, YOUR WAY

A small API.
A useful set of controls.

Every supported option is included in the Free Plan, within your daily quota.

01query

Start with a question.

Send the search terms or natural-language question your agent needs to explore.

"How do AI agents search the web?"
02count

Choose how much to retrieve.

Request up to 50 results. The number returned depends on what is available for your query.

1–50 results
03contents.text

Give your model the page.

Enable full webpage text to return text instead of snippet. Defaults to 5000 characters per result; use the object form to choose a positive limit.

true · { "max_characters": 3000 }
04freshness

Bring the time window into focus.

Choose a recent period, a specific UTC date, or an inclusive date range. Use noLimit to search without a date filter.

oneDay · oneWeek · oneMonth · oneYear · noLimit · YYYY-MM-DD · YYYY-MM-DD..YYYY-MM-DD
05includeDomains

Choose your sources.

Focus the search on selected domains. Omit the list or leave it empty to search without this restriction.

["langsearch.com", "openai.com"]
06excludeDomains

Leave the noise out.

Exclude selected domains from the results. Combine with date filters to focus your research.

["reddit.com"]
ONE CONNECTION. MANY POSSIBILITIES.

Built into your
next idea.

Laptop surrounded by documentation pages
Coding agents

Keep up with the docs.

Find current documentation and references while your agent works through an implementation.

Research papers and a magnifying lens
Research workflows

Start with the sources.

Collect relevant references, bring context into your workflow and let your model synthesize.

Architectural view of a city through glass
Business intelligence

See what changed.

Find company announcements and market information to inform your next account brief.

Get started

Connect your tools.
Search the world.

GET STARTED

Your tools. The whole web.

Terminal
export LANGSEARCH_API_KEY="YOUR_LANGSEARCH_API_KEY" codex mcp add langsearch --url https://mcp.langsearch.com/mcp --bearer-token-env-var LANGSEARCH_API_KEY

Add your LangSearch API key, then run the command or save the configuration in your client.

Get free API key
LESS BETWEEN YOUR AGENT AND THE WEB

Build something
worth searching for.

Get your free API key Web Search API. All supported features free.