页面简介
Get an API key, then use Exa from your code or your agent.
正文摘录
Using ChatGPT or Claude? Install Exa there and sign in, with no code or API key. See Exa in Codex and ChatGPT or Exa in Claude. 1. Get an API keyAgents: see exa.ai/auth.md for every way to get access.1Visit the Exa DashboardGet your Exa API keyCreate a key in the dashboard. New accounts start with free credits.2Set the key as an environment variable macOS/Linux Windowsexport EXA_API_KEY="your-api-key" setx EXA_API_KEY "your-api-key" 2. Choose how you’ll use ExaExa fits into your application two ways: call the APIs from your own code, or connect an agent you already use.Call the APIsUse Search, Contents, and Exa Agent from your own code. Install an SDK below and make your first request.Install an SDKConnect your agentConnect ChatGPT, Claude, Codex, or Cursor to Exa’s search and research tools. Without an API key, Exa MCP runs search and fetch at a free rate limit. Exa Agent needs sign-in or an API key.Set up Exa MCPBuilding with the APIs? Pick where to start:Start withUse it forSearchFinding relevant web pages & returning synthesized content in under 2sDeep SearchHigher-quality search where an LLM iteratively finds better resultsAgentLong-running asynchronous research, list building, enrichment, or reportsContentsExtracting page content when you already have the URL(s) 3. Install an SDKPythonJavaScriptpip install exa-py # Or, if using uv: uv add exa-py 4. Make your first requestPythonJavaScriptcURLfrom exa_py import Exa exa = Exa() results = exa.search( "best blog posts about vector databases", contents={"highlights": True}, ) for result in results.results: print(result.title, result.url) Next stepsSearch APIFind relevant pages and return clean content or structured outputs.Read guideAgent APIBuild long-running research, list-building, and enrichment workflows.Read guideContents APIExtract clean content from pages you already know.Read guideExa MCPConnect any MCP client to Exa’s web search, page fetching, and Exa Agent tools.Read guide