JSON Response - Autoparse

For select websites the API will parse all the valuable data in the HTML response and return it in JSON format. To enable this feature, simply add autoparse=true to your request and the API will parse the data for you. Currently, this feature works with Amazon, Google Search, Google Shopping and Walmart.

  • API REQUEST

import fetch from 'node-fetch';

fetch('https://api.scraperapi.com/?api_key=APIKEY&autoparse=true&url=https://www.amazon.com/dp/B07V1PHM66')
.then(response => {
console.log(response)
})
.catch(error => {
console.log(error)
})
  • PROXY MODE

const axios = require('axios');

axios.get('http://httpbin.org/ip', {
  method: 'GET',
  proxy: {
    host: 'proxy-server.scraperapi.com',
    port: 8001,
    auth: {
      user: 'scraperapi.autoparse=true',
      password: 'APIKEY'  
    },
    protocol: 'http'
  }
})
  .then(response => {
    console.log(response)
  })
  .catch(error => {
    console.log(error)
  });
  • SDK METHOD

// remember to install the library: npm install scraperapi-sdk --save
const scraperapiClient = require('scraperapi-sdk')('APIKEY')
scraperapiClient.get('https://www.amazon.com/dp/B07V1PHM66', {autoparse: true})
.then(response => {
  console.log(response)
})
.catch(error => {
  console.log(error)
})

Last updated