JSON Response - Autoparse

For selected domains we offer a parameter that parses the data and returns structured JSON format. You enable the parsing simply by adding autoparse=true to your request.

Available domains:

GoogleAmazonWalmartEbay

Search Result

Product Pages

Product Pages

Products Pages

News Results

Search Results

Category Pages

Search Results (coming soon)

Job Results

Offers

Search Results

Shopping Results

Product Reviews

Product Reviews

Google Maps (coming soon)

We recommend using our Structured Data Endpoints instead of the autoparse parameter.

You can find all available endpoints here.

API REQUEST

require 'net/http'
require 'json'
params = {
:api_key => "APIKEY",
:autoparse => true,
:url => "http://httpbin.org/ip"
}
uri = URI('https://api.scraperapi.com/')
uri.query = URI.encode_www_form(params)
website_content = Net::HTTP.get(uri)
print(website_content)

PROXY MODE

require 'httparty'
HTTParty::Basement.default_options.update(verify: false)
response = HTTParty.get('http://httpbin.org/ip', {
  http_proxyaddr: "proxy-server.scraperapi.com",
  http_proxyport: "8001",
  http_proxyuser: "scraperapi.autoparse=true",
  http_proxypass: "APIKEY"
})
results = response.body
puts results 

SDK METHOD

# remember to install the library: gem install scraperapi
require "scraper_api"
client = ScraperAPI::Client.new("APIKEY")
result = client.get("http://httpbin.org/ip", autoparse: true).raw_body
puts result

Last updated