Making use of curb, a Ruby binding for libcurl:

require 'curb'

url = ""
proxy = ""
proxy_auth = "<API KEY>:"

c = do |curl|
  curl.proxypwd = proxy_auth
  curl.proxy_url = proxy
  curl.verbose = true

puts c.body_str

Making use of typhoeus, another Ruby binding for libcurl:

require 'typhoeus'

url = ""
proxy_host = ""
proxy_auth = "<API KEY>:"

request =
  method: :get,
  proxy: proxy_host,
  proxyuserpwd: proxy_auth
print "Response Code: "
puts request.response.code
print "Response Time: "
puts request.response.total_time
print "Response Headers: "
puts request.response.headers
print "Response Body: "
puts request.response.body

Making use of mechanize, a Ruby library for automated web interaction: Don’t forget to load the Certificate file crawlera-ca.crt and set it using the env variable export SSL_CERT_FILE=/path/to/crawlera-ca.crt

require 'rubygems'
require 'mechanize'

url = ""
proxy_host = ""
proxy_api_key = "<API KEY>"

agent =
agent.set_proxy proxy_host, 8010, proxy_api_key, ''

res = agent.get(url)
puts res.body