TalorDataofficial JavaScript SDK for integrating search data into your AI workflow, RAG / fine-tuning, or JavaScript application. TalorData helps developers and AI applications connect to real-time, structured, and reliable search data through a single SERP API. With support for Google, Bing, News, Images, Shopping, Maps, Scholar, Trends, and more, TalorData makes it easier to build AI agents, search copilots, SEO workflows, and data-driven automations powered by live search results.
npm install talordata-serp
Sign up at TalorData and get your API key from the dashboard.
const { Client } = require("talordata-serp");
async function main() {
const client = new Client({ apiToken: process.env.TALORDATA_API_TOKEN });
const result = await client.search({
engine: "google",
q: "car",
});
console.log(result.search_metadata?.status);
console.log(result.search_information?.query_displayed);
}
main().catch(console.error);
-
examples/basic-search.js: basicjson=1search example. -
examples/json-plus-html.js:json=2example with both HTML and parsed JSON. -
examples/html-output.js:json=3example that prints HTML output.
You can also set the token once in your shell:
export TALORDATA_API_TOKEN=your_token
Then use the top-level helper:
const talordata = require("talordata-serp");
async function main() {
const result = await talordata.search({
engine: "google",
q: "car",
});
console.log(result);
}
main().catch(console.error);
-
new Client({ apiToken }): create a reusable client. -
client.search(...): send a form-encodedPOSTrequest to/serp/v1/requestand return the parsed result. -
client.searchJson(...): alias ofsearch(...). -
client.searchHtml(...): return the HTML string forjson=3. -
client.rawSearch(...): return the raw HTTP response body.
-
json=1: returns parsed JSON data. This is the default mode used byclient.search(...). -
json=2: returns bothhtmlandjson. The SDK automatically parsesdata.jsoninto an object when possible. -
json=3: returns HTML. The SDK unwraps the HTML string from the API response.
const { Client } = require("talordata-serp");
async function main() {
const client = new Client({ apiToken: process.env.TALORDATA_API_TOKEN });
const result = await client.search({
url: "https://www.google.com/search",
q: "car",
json: 1,
});
console.log(result);
}
main().catch(console.error);
-
Auth uses the
Authorization: Bearer <token>header. -
Requests are sent as
application/x-www-form-urlencoded. -
Boolean params are normalized to
"1"and"0"before sending.
Explore TalorData SERP API integrations and use cases: