Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@serphouse/serphouse-nodejs
Advanced tools
Automate your search engines (Google, Bing, Yahoo) result (serp api) using Serphouse.com API client and retrive in structured JSON format.
SERPHouse API is the starting point on your journey towards building a powerful SEO software. With SERPHouse you can get all the data you’d need to build an efficient application while also saving your time and your budget.
This comprehensive document designed to provide you with all the technical information as well as product information you need to interact with our API and harness its full potential. Whether you're a software developer integrating SERPHouse SERP API services into your application or a curious user exploring the possibilities, this API documentation will serve as your go-to resource.
High Volume SERP API for SEO professionals and data scientist. We built reliable, accurate and cost efficient solution, We take cares of resolving captcha, managing proxy to ensure you get reliable Structured JSON data.
This API supported Serphouse's standard REST API that accepts/returns JSON requests. Here is the API reference
Using the Serphouse API wrapper for Node.js is really simple. Follow these steps to integrate it into your project:
Documentation of Serphouse's API and their usage is available at https://docs.serphouse.com/
node >= 14.21.3
npm install @serphouse/serphouse-nodejs --save
var serphouse = require("@serphouse/serphouse-nodejs")("YOUR_API_KEY");
OR
var SerphouseAPI = require("@serphouse/serphouse-nodejs");
var serphouse = new SerphouseAPI("YOUR_API_KEY");
OR
var SerphouseAPI = require("@serphouse/serphouse-nodejs");
var serphouse = new SerphouseAPI();
serphouse.setApiToken("YOUR_API_KEY");
import * as SerphouseAPI from "@serphouse/serphouse-nodejs";
var serphouse = new SerphouseAPI();
serphouse.setApiToken("YOUR_API_KEY");
You can obtain an API key by registering at https://app.serphouse.com/register. This key will be required for accessing the API.
Serp Api
/** Performing a realtime search */
var payload = {
data: {
q: "Coffee",
domain: "google.com",
lang: "en",
device: "desktop",
serp_type: "web",
loc: "Alba,Texas,United States",
verbatim: 0,
postback_url: "https://webhook.site/8f885f1f-c38a-4a10-8506-335441213208",
page: 1,
num_result: 10,
},
path: { responseType: "json" },
};
try {
var response = await serphouse.SerpApi.live(payload);
} catch (error) {
return;
}
If you need to get response by responseType HTML or Json then you can use Like Below Example:
serphouse.SerpApi.live("DATA_ARRAY", "responseType"); // default responseType is Json
/** Create a new schedule */
var payload = {
data: [
{
q: "Coffee",
domain: "google.com",
lang: "en",
device: "desktop",
serp_type: "web",
loc: "Alba,Texas,United States",
verbatim: 0,
postback_url: "https://webhook.site/8f885f1f-c38a-4a10-8506-335441213208",
page: 1,
num_result: 10,
},
],
};
try {
var response = await serphouse.SerpApi.schedule(payload);
} catch (error) {
return;
}
/** You will get a status of your serp task */
var payload = { query: { id: 127105618 } };
try {
var response = await serphouse.SerpApi.check(payload);
} catch (error) {
return;
}
/** you will receive an json array containing a result of your serp query */
var payload = {
query: { id: 127673427 },
path: { responseType: "html" }, // path is optional default get json
};
try {
var response = await serphouse.SerpApi.get(payload);
} catch (error) {
return;
}
If you need to get response by responseType HTML or Json then you can use like below example:
serphouse.SerpApi.get("SERP_ID", "responseType"); // default responseType is Json
Domains List
/** Get domains list */
try {
var response = await serphouse.Domains.list();
} catch (error) {
return;
}
Language List
/** Get list of languages by Google, Bing and Yahoo */
try {
const payload = { path: { type: "google" } };
var response = await serphouse.Languages.list(payload);
} catch (error) {
return;
}
If you need to get Languages List by google, bing and yahoo then you can use like below example:
serphouse.Languages.list({ type: "bing" }); // default type is google
Locations List
/** Get locations available for our SERP API */
try {
const payload = {
query: {
q: "india",
type: "google",
},
};
var response = await serphouse.Location.search(payload);
} catch (error) {
return;
}
Account Info
/** Get your account information */
try {
var response = await serphouse.Account.fetch();
} catch (error) {
return;
}
Trends Api
/** Performing a realtime google trends search */
try {
var payload = {
time_zone_offset: -330,
keywords: "google,youtube",
time: "now 1-d",
};
var response = await serphouse.Trends.search(payload);
} catch (error) {
return;
}
/** Create trend schedule */
try {
var payload = {
data: [
{
time_zone_offset: -330,
keywords: "google,youtube",
time: "now 1-d",
},
],
};
var response = await serphouse.Trends.schedule(payload);
} catch (error) {
return;
}
/** Retrieve full list of timezone and its offset value */
try {
var response = await serphouse.Trends.timeZoneList();
} catch (error) {
return;
}
/** Retrieve full list of categories and sub category */
try {
var response = await serphouse.Trends.categoryList();
} catch (error) {
return;
}
/** Retrieve full list of country and state */
try {
var response = await serphouse.Trends.countryStateList();
} catch (error) {
return;
}
/** Retrieve full list of language. */
try {
var response = await serphouse.Trends.languageList();
} catch (error) {
return;
}
/** Check search status. */
try {
var payload = { query: { id: 127105618 } };
var response = await serphouse.Trends.check(payload);
} catch (error) {
return;
}
/** Get result of your trend search query. */
try {
var payload = { query: { id: 127105618 } };
var response = await serphouse.Trends.get(payload);
} catch (error) {
return;
}
Example of success response.
{Response : {"status":"success","msg":"Completed","search_metadata":{"id":128078258,"status":"success","created_at":"2024-05-04T06:20:10.000000Z","processed_at":"2024-05-04 06:20:10"},"search_parameters":{"langauge_code":"en-US","geo":"US","keywords":"google,youtube","time_zone_offset":"-330","time":"now 1-d","category":0,"property":"youtube"},"results":{"TIMESERIES":[{"time":"1714716960","formattedTime":"May 3, 2024 at 11:46 AM","formattedAxisTime":"May 3 at 11:46 AM","value":[19,72],"hasData":[true,true],"formattedValue":["19","72"]}],"GEO_MAP":{"google":{"default":{"geoMapData":[{"geoCode":"US-VT","geoName":"Vermont","value":[100],"formattedValue":["100"],"maxValueIndex":0,"hasData":[true]}]}},"youtube":{"default":{"geoMapData":[{"geoCode":"US-NH","geoName":"New Hampshire","value":[100],"formattedValue":["100"],"maxValueIndex":0,"hasData":[true]}]}}},"RELATED_QUERIES":{"google":{"default":{"rankedList":[{"rankedKeyword":[{"query":"google link","value":100,"formattedValue":"100","hasData":true,"link":"/trends/explore?q=google+link&date=now+1-d&geo=US"}]},{"rankedKeyword":[{"query":"the man who killed google search","value":1650,"formattedValue":"+1,650%","link":"/trends/explore?q=the+man+who+killed+google+search&date=now+1-d&geo=US"}]}]}},"youtube":{"default":{"rankedList":[{"rankedKeyword":[{"query":"on youtube","value":100,"formattedValue":"100","hasData":true,"link":"/trends/explore?q=on+youtube&date=now+1-d&geo=US"}]},{"rankedKeyword":[{"query":"jayson tatum youtube channel","value":5300,"formattedValue":"Breakout","link":"/trends/explore?q=jayson+tatum+youtube+channel&date=now+1-d&geo=US"}]}]}}}}}}
Example of validation errors response.
{"status":"error","msg":"validation_error","error":{"time_zone_offset":["The time zone offset field is required."]}}
FAQs
Automate your search engines (Google, Bing, Yahoo) result (serp api) using Serphouse.com API client and retrive in structured JSON format.
The npm package @serphouse/serphouse-nodejs receives a total of 1 weekly downloads. As such, @serphouse/serphouse-nodejs popularity was classified as not popular.
We found that @serphouse/serphouse-nodejs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.