Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
How to call the Serapi from a project - localhost in Nodejs and Angular

How can I call the URL?

node-controller.js

const SerpApi = require('google-search-results-nodejs');
const search = new SerpApi.GoogleSearch("serpApi-key");

const params = {
  api_key: "secret_api_key",
  q: "Coffee",
  location: "Austin, Texas, United States",
  hl: "en",
  gl: "us",
  google_domain: "google.com"
};
const callback = function(data) {
  console.log(data);
};

  
router.post('/seekSearchApi/serpapi.com/search.json', seekSearchApi);
 module.exports = router;
function seekSearchApi(req, res) { 
search.json(params, callback);
}

server.js

var express = require ('express');
var app = express();
app.use('/seekSearchApi/serpapi.com/search.json', require('./server/nodejs-serverapi'));

I tried to call the API using various URLs like -

http://localhost:3003/serpapi.com/search.json/?q= "Coffee",&location= "Austin, Texas, United States",&hl= "en",&gl= "us",&google_domain= "google.com"

But it did not work. What can I try next?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!