webSearch({
// Search settings
type: "auto", // "auto", "neural", "fast", "deep"
category: "news", // "company", "research paper", "news", "pdf",
// "github", "personal site", "linkedin profile", "financial report"
numResults: 10,
// Filter by domain
includeDomains: ["linkedin.com", "github.com"],
excludeDomains: ["wikipedia.com"],
// Filter by date (ISO 8601)
startPublishedDate: "2025-01-01T00:00:00.000Z",
endPublishedDate: "2025-12-31T23:59:59.999Z",
startCrawlDate: "2025-01-01T00:00:00.000Z",
endCrawlDate: "2025-12-31T23:59:59.999Z",
// Filter by text
includeText: ["AI"], // Must contain
excludeText: ["spam"], // Must not contain
// Location
userLocation: "US", // Two-letter country code
// Content options
contents: {
text: {
maxCharacters: 1000,
includeHtmlTags: false,
},
summary: {
query: "Main points",
},
livecrawl: "fallback", // "never", "fallback", "always", "preferred"
livecrawlTimeout: 10000,
subpages: 5,
subpageTarget: "about",
extras: {
links: 5,
imageLinks: 3,
},
},
})