SDK Method

To make it easier to get up and running you can also use our SDK. First, you will need to install the SDK:

gem install scraperapi

Then integrate it into your code:

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

To enable extra functionality while using our SDK, simply add an additional parameter to the GET request:

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

To use two or more parameters, simply add them to the GET request:

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

Last updated