Skip to main content

Overview

Web services provide tools for searching the internet and discovering information through search engines.

Available Services

Search

Perform Google searches and access knowledge graph data

Common Use Cases

const results = await services.web.search({
   query: "best CRM software 2024",
});

results.results.forEach((result) => {
   console.log(result.title);
   console.log(result.link);
   console.log(result.snippet);
});

Search Within a Domain

const results = await services.web.search({
   query: "pricing",
   domain: "stripe.com",
});

Access Knowledge Graph

const results = await services.web.search({
   query: "Microsoft",
});

if (results.knowledgeGraph) {
   console.log(results.knowledgeGraph.title);
   console.log(results.knowledgeGraph.description);
   console.log(results.knowledgeGraph.website);
}