// Fast mode - lower latency, shorter content
await valyu.search(query, { fastMode: true });
// Restrict to specific sources (datasets, domains, or presets)
await valyu.search("quantum computing applications", {
includedSources: ["valyu/valyu-arxiv", "valyu/valyu-pubmed"],
responseLength: "medium",
});
// ...or exclude sources instead (use one or the other, not both)
await valyu.search(query, { excludeSources: ["example.com"] });
// Expand PubMed coverage while retaining full-text chunks where available
await valyu.search("clonal hematopoiesis cardiovascular disease", {
includedSources: ["valyu/valyu-pubmed"],
includeAbstracts: true,
});
// Bias ranking without hard filtering (-5 demote ... +5 boost)
await valyu.search("climate change research", {
sourceBiases: { "nasa.gov": 5, "noaa.gov": 3, "example.com": -4 },
});
// Filter by country and date range
await valyu.search("renewable energy policies", {
countryCode: "US",
startDate: "2024-01-01",
endDate: "2024-12-31",
});
// News mode (up to 100 results with the increased_max_results permission)
await valyu.search("AI breakthroughs", { searchType: "news", maxNumResults: 50 });