Skip to main content
Control exactly which sources your search uses. Focus on trusted domains, target specific datasets, exclude unreliable sources, or soft-rank toward preferred domains.

Three controls

ParameterTypeEffect
included_sourcesstring[]Only search within these sources (hard filter)
excluded_sourcesstring[]Remove these sources from results (hard filter)
source_biasesobject (source → int)Soft-rank from -5 (demote) to +5 (boost), no hard filter
If both included_sources and excluded_sources are set, included_sources wins. Use hard filters for strict control; use source_biases to nudge ranking while still letting any source appear if highly relevant.

What you can pass

Every source field accepts any mix of these formats:
FormatExampleWhat it does
Domain"arxiv.org"Includes/excludes the entire domain
Base URL"https://docs.aws.amazon.com"Includes/excludes the entire site
Specific path"nasa.gov/news"Targets only that path
Dataset id"valyu/valyu-arxiv"A Valyu proprietary dataset
Preset"academic"Expands to a curated bundle for a domain (see below)
Collection"collection:my-sources"Expands to your saved collection
Web keyword"web"Includes general web search alongside any datasets you list
Paths are exact: "valyu.ai/blog" affects only that path. To include a whole domain, use just the domain name.

Presets

Presets are curated bundles of vetted sources. Pass a preset name and it expands to the right datasets and domains for you - no need to remember individual ids.
PresetCovers
academicResearch papers and preprints (arXiv, PubMed, bioRxiv, …)
financeMarkets, filings, and financial data
patentPatent records (USPTO, EPO)
transportationTransportation and logistics data
politicsGovernment and parliamentary sources
legalCase law and legislation
healthClinical trials, drug labels, and health data
genomicsGenomics and bioinformatics databases
chemistryChemical and drug-discovery databases
physicsPhysics open data
from valyu import Valyu

valyu = Valyu()
response = valyu.search(
    "mRNA vaccine thermostability",
    included_sources=["academic", "health"],  # combine presets
)
import { Valyu } from "valyu-js";

const valyu = new Valyu();
const response = await valyu.search("mRNA vaccine thermostability", {
  includedSources: ["academic", "health"],
});
curl -X POST https://api.valyu.ai/v1/search \
  -H "x-api-key: your-valyu-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mRNA vaccine thermostability",
    "included_sources": ["academic", "health"]
  }'
Premium presets (finance, patent, genomics, chemistry, and others that resolve to proprietary datasets) require a subscription. academic and web work on any plan, and a plan also lowers your cost per credit.
Reuse the same source combinations often? Save them as a Collection and reference by name.

Source biases

source_biases influences ranking without hard filtering. Biased sources can still appear (or drop) based on relevance - values just nudge the order. Range: -5 (strong demotion) to +5 (strong boost); 0 has no effect.
response = valyu.search(
    "climate change policy impact",
    source_biases={
        "epa.gov": 5,
        "nasa.gov": 4,
        "noaa.gov": 3,
        "example.com": -4,
    },
)
const response = await valyu.search("climate change policy impact", {
  sourceBiases: {
    "epa.gov": 5,
    "nasa.gov": 4,
    "noaa.gov": 3,
    "example.com": -4,
  },
});
curl -X POST https://api.valyu.ai/v1/search \
  -H "x-api-key: your-valyu-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "climate change policy impact",
    "source_biases": { "epa.gov": 5, "nasa.gov": 4, "noaa.gov": 3, "example.com": -4 }
  }'
You can combine source_biases with included_sources / excluded_sources in the same request for fine-grained control.

More examples

Python
valyu.search(
    "quantum computing error correction",
    included_sources=[
        "valyu/valyu-arxiv",
        "valyu/valyu-pubmed",
        "valyu/valyu-biorxiv",
        "valyu/valyu-medrxiv",
        "valyu/valyu-chemrxiv",
    ],
)
Python
valyu.search(
    "React server components best practices",
    included_sources=[
        "https://react.dev/",
        "https://nextjs.org/docs",
        "https://docs.aws.amazon.com/",
        "developer.mozilla.org",
    ],
)
Python
valyu.search(
    "artificial intelligence safety research",
    excluded_sources=["example.com", "example.org", "example.net"],
)
Python
valyu.search(
    "immunotherapy cancer treatment efficacy",
    included_sources=[
        "valyu/valyu-pubmed",
        "valyu/valyu-clinical-trials",
        "valyu/valyu-drug-labels",
        "valyu/valyu-medrxiv",
    ],
)
Python
valyu.search(
    "cryptocurrency regulation impact banking sector",
    included_sources=[
        "federalreserve.gov",
        "sec.gov",
        "treasury.gov",
        "imf.org",
    ],
    max_num_results=15,
)

Collections

Save reusable source bundles

Data sources

Every dataset id and preset