Integrations
Use typesearch from LangChain, the Vercel AI SDK, LlamaIndex, n8n and the Exa SDKs, with the same key and prices as the API.
Each page below shows the shortest setup that works today, with the same key and the same prices as the API.
MCP server
Claude, Cursor, VS Code, Codex, Windsurf and any MCP client. Remote, one click.
LangChain
A news search tool and retriever for LangChain agents, in Python and JavaScript.
Vercel AI SDK
A news search tool for generateText, streamText and agents.
LlamaIndex
News search as a tool for LlamaIndex agents and workflows.
n8n
News in your workflows, and as a tool for the AI Agent node.
Exa-compatible SDKs
exa-py, exa-js and langchain-exa, pointed at typesearch.
Your key
Every integration uses the same API key. Create one in the dashboard — new accounts get $5 of free credit, valid for 30 days — and keep it in an environment variable:
export TYPESEARCH_API_KEY="ts_live_…"What it costs
Each call is billed like the API request it makes: a search by its mode ($1.40 per 1,000
in fast, $2.20 in normal, $5.60 in deep), contents per page and similar per request. Identical
requests within 10 minutes come from the cache and cost nothing.
Other frameworks
Any agent framework that speaks MCP can use the MCP server: connect to
https://api.typesearch.ai/mcp with your key in Authorization: Bearer, and the agent gets search_news,
get_contents, find_similar and check_coverage. These examples read the key from TYPESEARCH_API_KEY;
they also need the key of the model they use.
// npm install @mastra/core @mastra/mcp zod
import { Agent } from '@mastra/core/agent';
import { MCPClient } from '@mastra/mcp';
const mcp = new MCPClient({
id: 'typesearch',
servers: {
typesearch: {
url: new URL('https://api.typesearch.ai/mcp'),
requestInit: { headers: { Authorization: `Bearer ${process.env.TYPESEARCH_API_KEY}` } },
timeout: 90_000, // a "deep" search can take about a minute
},
},
});
const agent = new Agent({
id: 'news-researcher',
name: 'News researcher',
instructions: 'Answer briefly and cite every article you use by its link.',
model: 'openai/gpt-5-mini',
tools: await mcp.listTools(), // typesearch_search_news, typesearch_get_contents, …
});
const result = await agent.generate('What did news outlets report this week about central bank rate decisions?');
console.log(result.text);
await mcp.disconnect();CrewAI gives each MCP tool call 30 seconds, which a deep search can exceed.
Anything else
- Any language: the API is plain JSON over HTTPS, described by an OpenAPI 3.1 document you can feed to any client generator. See the API reference.
- The Tako and Perplexity SDKs work too: see Migrate from Tako and Migrate from Perplexity.