Get your free Valyu API key

Head to the Valyu Platform and sign in (or create an account). Then, copy one of your API keys from your dashboard.

Get your free API key

You get over 1000 free query retrievals. No credit card required.

Install Valyu

Install the Valyu SDK in your language of choice.

pip install valyu

Start searching with Valyu

Run your first Valyu Search in 4 lines of code. Simply replace the API key in this snippet with your own:

from valyu import Valyu

valyu = Valyu(api_key="your-valyu-api-key")
response = valyu.search("What is quantum computing?")

print(response)

from valyu import Valyu

valyu = Valyu(api_key="your-valyu-api-key")
response = valyu.search(
  "Implementation details of agentic search-enhanced large reasoning models",
  search_type="proprietary",
  max_num_results=10,
  max_price=30,
  relevance_threshold=0.5,
  category="agentic retrieval-augmented generation",
  included_sources=["valyu/valyu-arxiv"],
  is_tool_call=True
)

print(response)

Academic Research Data

Access millions of research papers and academic content with full-text search:

response = valyu.search(
    "Extending context window of large language models via positional interpolation",
    search_type="proprietary",
    max_num_results=5,
    max_price=30,
    included_sources=["valyu/valyu-arxiv"]
)

# Get detailed academic content with citations
print(response.results[0].content)

Response includes rich academic content:

{
    "success": true,
    "error": "",
    "tx_id": "tx_55e65c6f-3607-4ebe-892b-e964b9c72a8d",
    "query": "Extending context window of large language models via positional interpolation",
    "results": [
      {
        "id": "55e65c6f-3607-4ebe-892b-e964b9c72a8d:2306.15595:1",
        "title": "Extending Context Window of Large Language Models via Positional Interpolation",
        "url": "https://arxiv.org/abs/2306.15595?utm_source=valyu.network&utm_medium=referral",
        "content": "#### 2.3 PROPOSED APPROACH: POSITION INTERPOLATION (PI)\n\n#### 2.1 BACKGROUND: ROTARY POSITION EMBEDDING (ROPE)\n\nTransformer models require explicit positional information to be injected, typically in the form of positional encodings, to represent the order of inputs. We consider Rotary Position Embedding (RoPE) (Su et al., 2021), which is the position encoding used in the LLaMA model...\n\n$$\\mathbf{f}(\\mathbf{x},m)=[(x_{0}+\\mathrm{i}x_{1})e^{im\\theta_{0}},(x_{2}+\\mathrm{i}x_{3})e^{im\\theta_{1}},\\ldots,(x_{d-2}+\\mathrm{i}x_{d-1})e^{im\\theta_{d/2-1}}]^{\\top}$$",
        "source": "valyu/valyu-arxiv",
        "length": 593,
        "image_url": {
          "_page_4_Figure_2.jpeg": "https://prod-s3-vyplatform-processeddata.s3.amazonaws.com/valyu/Arxiv-new/eb030308-a71b-5227-8ddf-9dbeeb1c6e12/_page_4_Figure_2.jpeg"
        },
        "publication_date": "2023-01-01",
        "doi": "https://doi.org/10.48550/arxiv.2306.15595",
        "citation": "Shouyuan Chen et al. (2023). Extending Context Window of Large Language Models via Positional Interpolation.",
        "citation_count": 25,
        "authors": [
          "Shouyuan Chen",
          "S.H. Wong", 
          "Liangjian Chen",
          "Yuandong Tian"
        ],
        "price": 0.0005,
        "data_type": "unstructured",
        "source_type": "paper",
        "relevance_score": 0.8071867796187081
      }
    ],
    "results_by_source": {
        "proprietary": 1,
        "web": 0
    }
}

Financial Market Data

Want financial data? Just ask in plain English - we’ll figure it out:

response = valyu.search(
    "Pfizer stock price since COVID-19 outbreak",
    search_type="proprietary",
    max_num_results=1,
    max_price=30                  # Maximum price for a thousand retreivals (CPM)
)

# The response includes structured JSON data
print(response.results[0].content)

Response looks like this:

{
    "success": true,
    "error": "",
    "tx_id": "tx_6a2568cf-a3f4-4860-9b6e-96b35e398b7f",
    "query": "Price of TSLA today?",
    "results": [
      {
        "title": "Price of PFE every 1mo between 2020-01-01 00:00 and 2025-05-26 00:00",
        "url": "https://platform.valyu.network/context-enrichment/valyu/valyu-stocks-US/characteristics",
        "content": [
          {
              "datetime": "2025-05-01 04:00:00",
              "open": 24,
              "high": 24,
              "low": 22,
              "close": 23,
              "volume": 78776482
          },
          {
            ...
          }
        ],
        "source": "valyu/valyu-stocks-US",
        "price": 0.006,
        "length": 8175,
        "image_url": null,
        "data_type": "structured",
        "source_type": "data",
        "relevance_score": 0.6277149030411012
      }
    ],
    "results_by_source": {
        "proprietary": 1,
        "web": 0
    }
}

Our natural language processing is so good, it even understands queries like ”$$$$$ of larry and Sergey brins companie. on fr week commencing 5th hune on the 21st century” 🤯 (Yes, that means “Google stock price for Friday June 5th, 2021” - we’re that good!)

Advanced Features

Deep Research

Search across proprietary academic papers, financial data, and more with search_type="proprietary"

Web Intelligence

Get smart web search results that are actually relevant with search_type="web"

Cost Control

Set max_price to control costs for a thousand queries (CPM). Only pay for what you use!

Quality Filtering

Use relevance_threshold to ensure only relevant results

Next Steps