Search parameters can be now be sent in as the first argument of getJson and getHtml instead of the engine argument. Note that you won't get auto-completions for the supported search parameters for that engine.
// Show result as JSON (async/await with search params as first argument)
const response2 = await getJson({ engine: "google", ...params });
console.log(response2["organic_results"]);
This is useful to align to SerpApi's other libraries.
Provides a warning-free approach if a particular engine type hasn't been added to the library.
Search parameters can be now be sent in as the first argument of
getJson
andgetHtml
instead of theengine
argument. Note that you won't get auto-completions for the supported search parameters for that engine.Related to https://github.com/serpapi/serpapi-javascript/issues/5