1818### Node.js
1919
2020- Supports Node.js 7.10.1 and newer.
21- - Refer to [ this example] ( examples/node/basic_js_node_7_up ) for help.
21+ - Refer to [ this example] ( examples/node/js_node_7_up ) for help.
2222
2323``` bash
2424npm install serpapi
@@ -40,7 +40,7 @@ getJson({
4040
4141- If you prefer using the ` import ` syntax and top-level ` await ` , you need to use
4242 at least Node.js 14.8.0.
43- - Refer to [ this example] ( examples/node/basic_js_node_14_up ) for help.
43+ - Refer to [ this example] ( examples/node/js_node_14_up ) for help.
4444
4545You will need to add ` "type": "module" ` to your ` package.json ` :
4646
@@ -66,10 +66,17 @@ console.log(response);
6666
6767- Import directly from deno.land.
6868- Usage is otherwise the same as above.
69- - Refer to [ this example] ( examples/deno/basic_ts ) for help.
69+ - Refer to [ this example] ( examples/deno ) for help.
7070
7171``` ts
7272import { getJson } from " https://deno.land/x/serpapi/mod.ts" ;
73+ const response = await getJson ({
74+ engine: " google" ,
75+ api_key: API_KEY , // Get your API_KEY from https://serpapi.com/manage-api-key
76+ q: " coffee" ,
77+ location: " Austin, Texas" ,
78+ });
79+ console .log (response );
7380```
7481
7582## Features
@@ -80,7 +87,6 @@ import { getJson } from "https://deno.land/x/serpapi/mod.ts";
8087- Promises and async/await support.
8188- Callbacks support.
8289- [ Examples in JavaScript/TypeScript on Node.js/Deno using ESM/CommonJS, and more] ( https://github.com/serpapi/serpapi-javascript/tree/master/examples ) .
83- - (Planned) More error classes.
8490
8591## Configuration
8692
0 commit comments