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

147
Views
Setting up Callback Function for ParseHub API

I am currently trying to set up ParseHub's API in order to feed data from the web scraping software into a MongoDB database. I am currently attempting to take the last ready scraping run and write it to a JSON file. However, I receive the following error. view error

Here is the code I am currently attempting. I'm not very familiar with request and it seems to be depreciated (ignore the "insert key here" sections).

request({
  uri: 'https://www.parsehub.com/api/v2/runs/KEYGOESHERE/data',
  method: 'GET',
  gzip: true,
  qs: {
    api_key: "INSERTED KEY",
    format: "json"
  }
}, function(err, resp, body) {
  console.log(body);
  fs.writeFile('APIsample.json', body);
});

Any help would be much appreciated, or even a way to run this without request. Thanks!

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!