Scrape.do allows you to send requests through supported countries using geotargeting. In this way, you can crawl the target web site more easily by focusing on a certain country.
To use geographic targeting, you must fill in the geoCode
attribute.
Beware that you need a Pro plan to use this feature!
$ curl "http://api.scrape.do?token=API_TOKEN \&url=https://www.example.com \&geoCode=us"
import requests​url = "http://api.scrape.do?token=API_TOKEN&geoCode=us&url=http://example.com"​payload = {}headers = {}​response = requests.request("GET", url, headers=headers, data = payload)​print(response.text.encode('utf8'))​
package main​import ("fmt""net/http""io/ioutil")​func main() {​url := "http://api.scrape.do?token=API_TOKEN&geoCode=us&url=http://example.com"method := "GET"​client := &http.Client {}req, err := http.NewRequest(method, url, nil)​if err != nil {fmt.Println(err)}res, err := client.Do(req)defer res.Body.Close()body, err := ioutil.ReadAll(res.Body)​fmt.Println(string(body))}
var client = new RestClient("http://api.scrape.do?token=API_TOKEN&geoCode=us&url=http://example.com");client.Timeout = -1;var request = new RestRequest(Method.GET);IRestResponse response = client.Execute(request);Console.WriteLine(response.Content);
OkHttpClient client = new OkHttpClient().newBuilder().build();Request request = new Request.Builder().url("http://api.scrape.do?token=API_TOKEN&geoCode=us&url=http://example.com").method("GET", null).build();Response response = client.newCall(request).execute();
var axios = require('axios');​var config = {method: 'get',url: 'http://api.scrape.do?token=API_TOKEN&geoCode=us&url=http://example.com',headers: {}};​axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
var xhr = new XMLHttpRequest();xhr.withCredentials = true;​xhr.addEventListener("readystatechange", function() {if(this.readyState === 4) {console.log(this.responseText);}});​xhr.open("GET", "http://api.scrape.do?token=API_TOKEN&geoCode=us&url=http://example.com");​xhr.send();
require "uri"require "net/http"​url = URI("http://api.scrape.do?token=API_TOKEN&geoCode=us&url=http://example.com")​http = Net::HTTP.new(url.host, url.port);request = Net::HTTP::Get.new(url)​response = http.request(request)puts response.read_body​
<?php​$curl = curl_init();​curl_setopt_array($curl, array(CURLOPT_URL => "http://api.scrape.do?token=API_TOKEN&geoCode=us&url=http://example.com",CURLOPT_RETURNTRANSFER => true,CURLOPT_ENCODING => "",CURLOPT_MAXREDIRS => 10,CURLOPT_TIMEOUT => 0,CURLOPT_FOLLOWLOCATION => true,CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST => "GET",));​$response = curl_exec($curl);​curl_close($curl);echo $response;​
import Foundation​var semaphore = DispatchSemaphore (value: 0)​var request = URLRequest(url: URL(string: "http://api.scrape.do?token=API_TOKEN&geoCode=us&url=http://example.com")!,timeoutInterval: Double.infinity)​request.httpMethod = "GET"​let task = URLSession.shared.dataTask(with: request) { data, response, error inguard let data = data else {print(String(describing: error))return}print(String(data: data, encoding: .utf8)!)semaphore.signal()}​task.resume()semaphore.wait()​
Some countries and their codes are given in the table below. The country that you cannot see below may be supported by the system, but for this you should use Business and above packages.
Country | GeoCode |
United States | us |
Great Britain | gb |
Canada | ca |
Turkey | tr |
China | cn |
Russia | ru |
Sweden | se |
Germany | de |
France | fr |
Spain | es |
Brazil | br |
​