import { getHtml } from "https://deno.land/x/serpapi@0.0.8/src/serpapi.ts";
Get a HTML response based on search parameters.
- Accepts an optional callback.
- Responds with a JSON string if the search request hasn't completed.
Examples
// async/await
const html = await getHtml("google", { api_key: API_KEY, q: "coffee" });
// async/await const html = await getHtml("google", { api_key: API_KEY, q: "coffee" });
// callback getHtml("google", { api_key: API_KEY, q: "coffee" }, console.log);
Type Parameters
E extends keyof EngineMap
Parameters
engine: E
- engine name
parameters: BaseParameters & EngineMap[E]["parameters"]
- search query parameters for the engine