> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valyu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Search API for AI Agents | Web + Proprietary Data

> The only search API that goes beyond the web. Access PubMed, SEC filings, clinical trials, patents, arXiv, and financial data through one unified API. Tavily and Exa alternative with deeper data access.

<div className="home-content">
  <div className="hero-section">
    # Build with Valyu

    <p className="subtitle">The search API built for AI agents.</p>
  </div>

  <div className="installation-container">
    <span className="section-label">Installation</span>

    <CardGroup cols={2}>
      <Card title="Python SDK" icon="python" href="/sdk/python-sdk">
        `pip install valyu`
      </Card>

      <Card title="JavaScript SDK" icon="node-js" href="/sdk/typescript-sdk">
        `npm install valyu-js`
      </Card>
    </CardGroup>

    {/* <span className="section-label">Try it now</span> */}

    <Tabs>
      <Tab title="Search the web" icon="magnifying-glass">
        <div className="tab-description">
          <span>Search the web and other data sources for relevant information and context for your AI agents.</span>
          <button className="copy-prompt-btn" data-prompt="search">Copy prompt</button>
        </div>

        <CodeGroup>
          ```python Python theme={null}
          from valyu import Valyu

          client = Valyu(api_key="your-api-key")

          response = client.search(
              query="Latest AI inference datacenter projects",
              search_type="all",
              max_num_results=10
          )

          print(response)
          ```

          ```javascript JavaScript theme={null}
          import { Valyu } from "valyu-js";

          const client = new Valyu("your-api-key");

          const response = await client.search({
            query: "Latest AI inference datacenter projects",
            searchType: "all",
            maxNumResults: 10
          });

          console.log(response);
          ```

          ```bash cURL theme={null}
          curl --request POST \
            --url https://api.valyu.ai/v1/search \
            --header 'Content-Type: application/json' \
            --header "x-api-key: $VALYU_API_KEY" \
            --data '{
              "query": "Latest AI inference datacenter projects",
              "search_type": "all",
              "max_num_results": 10
            }'
          ```
        </CodeGroup>

        [Learn more about the Search API →](/api-reference/endpoint/search)
      </Tab>

      <Tab title="Extract content" icon="file-lines">
        <div className="tab-description">
          <span>Extract and summarise content from any URL.</span>
          <button className="copy-prompt-btn" data-prompt="contents">Copy prompt</button>
        </div>

        <CodeGroup>
          ```python Python theme={null}
          from valyu import Valyu

          client = Valyu(api_key="your-api-key")

          response = client.contents(
              urls=["https://en.wikipedia.org/wiki/Artificial_intelligence"]
              extract_effort="auto"
          )

          print(response)
          ```

          ```javascript JavaScript theme={null}
          import { Valyu } from "valyu-js";

          const client = new Valyu("your-api-key");

          const response = await client.contents({
            urls: ["https://en.wikipedia.org/wiki/Artificial_intelligence"],
            extract_effort="auto"
          });

          console.log(response);
          ```

          ```bash cURL theme={null}
          curl --request POST \
            --url https://api.valyu.ai/v1/contents \
            --header 'Content-Type: application/json' \
            --header "x-api-key: $VALYU_API_KEY" \
            --data '{
              "urls": ["https://en.wikipedia.org/wiki/Artificial_intelligence"]
            }'
          ```
        </CodeGroup>

        [Learn more about the Contents API →](/api-reference/endpoint/contents)
      </Tab>

      <Tab title="Get answers" icon="message">
        <div className="tab-description">
          <span>Get AI answers grounded by our search.</span>
          <button className="copy-prompt-btn" data-prompt="answer">Copy prompt</button>
        </div>

        <CodeGroup>
          ```python Python theme={null}
          from valyu import Valyu

          client = Valyu(api_key="your-api-key")

          response = client.answer(
              query="What data sources can Valyu AI search over?"
          )

          print(response.answer)
          ```

          ```javascript JavaScript theme={null}
          import { Valyu } from "valyu-js";

          const client = new Valyu("your-api-key");

          const response = await client.answer({
            query: "What data sources can Valyu AI search over?"
          });

          console.log(response.answer);
          ```

          ```bash cURL theme={null}
          curl --request POST \
            --url https://api.valyu.ai/v1/answer \
            --header 'Content-Type: application/json' \
            --header "x-api-key: $VALYU_API_KEY" \
            --data '{
              "query": "What data sources can Valyu AI search over?"
            }'
          ```
        </CodeGroup>

        [Learn more about the Answer API →](/api-reference/endpoint/answer)
      </Tab>

      <Tab title="Deep research" icon="flask">
        <div className="tab-description">
          <span>Let AI search and research for you, delivering comprehensive reports.</span>
          <button className="copy-prompt-btn" data-prompt="deepresearch">Copy prompt</button>
        </div>

        <CodeGroup>
          ```python Python theme={null}
          from valyu import Valyu

          client = Valyu(api_key="your-api-key")

          # Start a research task
          task = client.deepresearch.create(
              query="Analyze the impact of AI on healthcare"
          )

          # Check status
          status = client.deepresearch.status(task.task_id)
          print(status)
          ```

          ```javascript JavaScript theme={null}
          import { Valyu } from "valyu-js";

          const client = new Valyu("your-api-key");

          // Start a research task
          const task = await client.deepresearch.create({
            query: "Analyze the impact of AI on healthcare"
          });

          // Check status
          const status = await client.deepresearch.status(task.taskId);
          console.log(status);
          ```

          ```bash cURL theme={null}
          curl --request POST \
            --url https://api.valyu.ai/v1/deepresearch \
            --header 'Content-Type: application/json' \
            --header "x-api-key: $VALYU_API_KEY" \
            --data '{
              "query": "Analyze the impact of AI on healthcare"
            }'
          ```
        </CodeGroup>

        [Learn more about DeepResearch →](/guides/deepresearch)
      </Tab>

      <Tab title="Use with MCP" icon="robot">
        <div className="tab-description">
          <span>Connect any MCP-compatible AI client to Valyu's hosted search tools via the remote MCP server.</span>
          <button className="copy-prompt-btn" data-prompt="mcp">Copy prompt</button>
        </div>

        <CodeGroup>
          ```json Claude / Cursor / Windsurf theme={null}
          {
            "mcpServers": {
              "valyu": {
                "type": "sse",
                "url": "https://mcp.valyu.ai/mcp?valyuApiKey=your-api-key"
              }
            }
          }
          ```

          ```python Python theme={null}
          from openai import OpenAI

          client = OpenAI()

          response = client.responses.create(
              model="gpt-4o",
              input="What are the latest AI research papers?",
              tools=[
                  {
                      "type": "mcp",
                      "server_label": "Valyu",
                      "server_url": "https://mcp.valyu.ai/mcp?valyuApiKey=your-api-key",
                      "require_approval": "never"
                  }
              ]
          )

          print(response.output_text)
          ```

          ```javascript JavaScript theme={null}
          import OpenAI from "openai";

          const client = new OpenAI();

          const response = await client.responses.create({
            model: "gpt-4o",
            input: "What are the latest AI research papers?",
            tools: [
              {
                type: "mcp",
                server_label: "Valyu",
                server_url: "https://mcp.valyu.ai/mcp?valyuApiKey=your-api-key",
                require_approval: "never"
              }
            ]
          });

          console.log(response.output_text);
          ```
        </CodeGroup>

        [Learn more about the MCP Server →](/integrations/mcp-server)
      </Tab>
    </Tabs>
  </div>

  <span className="section-label-heading">Start Building</span>

  <CardGroup cols={3}>
    <Card title="Quickstart & Use Cases" icon="bolt" href="/quickstart">
      Get up and running in minutes with step-by-step guides and real-world examples
    </Card>

    <Card title="Agent Skills" icon="play" href="/integrations/agent-skills">
      Pre-built skills for Claude Code, Cursor, Windsurf and other coding agents
    </Card>

    <Card title="Pricing" icon="receipt" href="/pricing">
      Simple, transparent pay-per-use pricing with \$10 free credits to start
    </Card>
  </CardGroup>

  <div className="home-footer">
    <a href="mailto:contact@valyu.ai"><Icon icon="envelope" /> Contact Us</a>
    <a href="https://x.com/valyuofficial"><Icon icon="x-twitter" iconType="brands" /> Twitter</a>
    <a href="https://discord.gg/umtmSsppRY" className="discord-link"><span className="discord-icon"><Icon icon="discord" iconType="brands" /></span> Join our Discord</a>
    <a href="https://github.com/valyuAI"><Icon icon="github" iconType="brands" /> GitHub</a>
    <a href="https://linkedin.com/company/valyu-ai"><Icon icon="linkedin" iconType="brands" /> LinkedIn</a>
  </div>

  <script src="/custom.js" />
</div>
