Skip to main content
Control exactly which sources your search uses. Focus on trusted domains, access specific datasets, or exclude unreliable sources.
Source filters accept domains, URLs, dataset names, or specific paths.

What You Can Do

  • Target authoritative sources - Focus on trusted domains and academic datasets
  • Block unreliable content - Exclude low-quality or biased sources
  • Access specific datasets - Search Valyu’s proprietary collections
  • Improve result quality - Get more relevant, higher-quality information

Parameters

included_sources

Type: Array of stringsOnly search within these sources. Can include domains, URLs, or dataset names.Example: ["arxiv.org", "valyu/valyu-pubmed"]

excluded_sources

Type: Array of stringsExclude these sources from results. Same formats as included_sources.Example: ["reddit.com", "news.ycombinator.com"]
If both included_sources and excluded_sources are provided, included_sources takes priority.

Source Formats

FormatExampleWhat It Does
Domain"arxiv.org"Includes/excludes entire domain
Base URL"https://docs.aws.amazon.com"Includes/excludes entire site
Specific Path"techcrunch.com/news"Targets only that path
Dataset Name"valyu/valyu-arxiv"Searches Valyu’s proprietary datasets
Path Specificity: When using paths (e.g., "valyu.ai/blog"), only that exact path is affected. For entire domains, use just the domain name.

Examples

Academic Sources

from valyu import Valyu

valyu = Valyu("your-api-key-here")
response = valyu.search(
    "quantum computing error correction",
    included_sources=[
        "arxiv.org",
        "valyu/valyu-arxiv", 
        "valyu/valyu-pubmed",
        "nature.com",
        "science.org"
    ],
    search_type="all"
)

Exclude Social Media

from valyu import Valyu

valyu = Valyu("your-api-key-here")
response = valyu.search(
    "artificial intelligence safety research",
    excluded_sources=[
        "reddit.com",
        "news.ycombinator.com", 
        "twitter.com",
        "linkedin.com",
        "quora.com"
    ]
)

Official Documentation

from valyu import Valyu

valyu = Valyu("your-api-key-here")
response = valyu.search(
    "React server components best practices",
    included_sources=[
        "https://react.dev/",
        "https://nextjs.org/docs",
        "https://docs.aws.amazon.com/",
        "developer.mozilla.org"
    ]
)

Use Cases

Financial Research

from valyu import Valyu

valyu = Valyu("your-api-key-here")
response = valyu.search(
    "cryptocurrency regulation impact banking sector",
    included_sources=[
        "federalreserve.gov",
        "sec.gov", 
        "reuters.com/business",
        "bloomberg.com",
        "imf.org"
    ],
    max_num_results=15
)

Medical Research

from valyu import Valyu

valyu = Valyu("your-api-key-here")
response = valyu.search(
    "immunotherapy cancer treatment efficacy",
    included_sources=[
        "valyu/valyu-pubmed",
        "valyu/valyu-clinical-trials",
        "valyu/valyu-drug-labels",
        "nejm.org",
        "thelancet.com", 
        "nature.com/nm"
    ],
    search_type="proprietary"
)

Technical Documentation

from valyu import Valyu

valyu = Valyu("your-api-key-here")
response = valyu.search(
    "Kubernetes security best practices RBAC",
    included_sources=[
        "kubernetes.io/docs",
        "docs.aws.amazon.com",
        "cloud.google.com/kubernetes-engine/docs"
    ]
)

News

from valyu import Valyu

valyu = Valyu("your-api-key-here")
response = valyu.search(
    "artificial intelligence regulation European Union",
    included_sources=[
        "reuters.com",
        "bbc.com/news",
        "apnews.com", 
        "europa.eu",
        "politico.eu"
    ]
)