Amazon ZIP Code Targeting

Please be aware that our current support is limited to US ZIP Codes exclusively

Target specific ZIP codes to scrape product listings, offers, search queries, and more from regions of interest, providing valuable insights for market research, competitor analysis, and pricing optimization. When you need to focus solely on a particular ZIP code, incorporate the zip parameter into your requests.

Here are some example ZIP codes that we support:

ZIP Code

33837

62864

92223

92392

Davenport, FL

Mount Vernon, VA

Beaumont, TX

Victorville, CA

For example, set zip=92223to retrieve information tailored to the Beaumont, TX area within the response:

  • API REQUEST

try {
String apiKey = "APIKEY";
String url = "https://api.scraperapi.com?api_key=" + apiKey + "&zip=92223&url=https://www.amazon.com/Ninja-Kitchen-BL770-Processor-Smoothies/dp/B00939I7EK";
URL urlForGetRequest = new URL(url);
String readLine = null;
HttpURLConnection conection = (HttpURLConnection) urlForGetRequest.openConnection();
conection.setRequestMethod("GET");
int responseCode = conection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(conection.getInputStream()));
StringBuffer response = new StringBuffer();
while ((readLine = in.readLine()) != null) {
response.append(readLine);
}
in.close();
System.out.println(response.toString());
} else {
throw new Exception("Error in API Call");
}
} catch (Exception ex) {
ex.printStackTrace();
}
  • PROXY MODE

try {
    String apiKey = "APIKEY";
    String proxy = "proxy-server.scraperapi.com";
    URL server = new URL("https://www.amazon.com/Ninja-Kitchen-BL770-Processor-Smoothies/dp/B00939I7EK");
    String proxyUsername="scraperapi.zip=92223";
    Authenticator.setDefault(new Authenticator() {
        protected PasswordAuthentication getPasswordAuthentication() {
          return new PasswordAuthentication(proxyUsername, apiKey.toCharArray());
        }
      });
    Properties systemProperties = System.getProperties();
    systemProperties.setProperty("http.proxyHost", proxy);
    systemProperties.setProperty("http.proxyPort", "8001");
    HttpURLConnection httpURLConnection = (HttpURLConnection) server.openConnection();
    httpURLConnection.connect();
    String readLine = null;
    int responseCode = httpURLConnection.getResponseCode();
    if (responseCode == HttpURLConnection.HTTP_OK) {
        BufferedReader in = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));
        StringBuffer response = new StringBuffer();
        while ((readLine = in.readLine()) != null) {
            response.append(readLine);
        }
        in.close();
        System.out.println(response.toString());
    } else {
        throw new Exception("Error in API Call");
    }
} catch (Exception ex) {
    ex.printStackTrace();
}
  • SDE METHOD

try {
String apiKey = "APIKEY";
String asin = "B00939I7EK";
String zip = "92223";
String url = "https://api.scraperapi.com/structured/amazon/offers?api_key=" + apiKey + "&asin=" + ASIN + "&zip=" + zip;
URL urlForGetRequest = new URL(url);
String readLine = null;
HttpURLConnection conection = (HttpURLConnection) urlForGetRequest.openConnection();
conection.setRequestMethod("GET");
int responseCode = conection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(conection.getInputStream()));
StringBuffer response = new StringBuffer();
while ((readLine = in.readLine()) != null) {
response.append(readLine);
}
in.close();
System.out.println(response.toString());
} else {
throw new Exception("Error in API Call");
}
} catch (Exception ex) {
ex.printStackTrace();
}
  • ASYNC SDE METHOD

Coming soon

We encourage you to explore the ZIP code targeting feature to see how it can enhance your data collection. Try various ZIP codes to get a feel for how the targeted information changes and tailor your requests to suit your needs. If certain ZIP codes are not working or accepted during your testing, please contact our support team to enable them for you.

Last updated