import { getJson } from "https://deno.land/x/serpapi@0.0.13/mod.ts";
Get a JSON response based on search parameters.
- Accepts an optional callback.
Examples
// async/await
const json = await getJson("google", { api_key: API_KEY, q: "coffee" });
// async/await const json = await getJson("google", { api_key: API_KEY, q: "coffee" });
// callback getJson("google", { api_key: API_KEY, q: "coffee" }, console.log);
Type Parameters
R extends BaseResponse<EngineMap[E]["parameters"]>