This endpoint will retrieve product data from an Google search result page and transform it into usable JSON.

try {
String apiKey = "APIKEY";
String query = "QUERY";
String country_code = "COUNTRY_CODE";
String tld = "TLD";
String url = "" + apiKey + "&query=" + QUERY + "&country_code=" + COUNTRY_CODE + "&tld=" + tld;
URL urlForGetRequest = new URL(url);
String readLine = null;
HttpURLConnection conection = (HttpURLConnection) urlForGetRequest.openConnection();
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) {
} else {
throw new Exception("Error in API Call");
} catch (Exception ex) {

The Google Structured Data endpoint supports several parameters:



User's normal API Key


Query keywords that a user wants to search for


Where a google domain needs to be scraped from another country (e.g. scraping from Canada to get Canadian results), specify the TLD as well as the COUNTRY_CODE parameters. Valid values are valid TLDs (e.g. “”, “.es”, etc.).


Country of Google domain to scrape. This is an optional argument and defaults to “us” ( Valid values include: us: '', uk: '', ca: '', de: '', es: '', fr: '', it: '', jp: '', in: '', cn: '', sg: '', mx: '', ae: '', br: '', nl: '', au: '', tr: '', sa: '', se: '', pl: ''

Google parameters

We also support Google Search parameters for this endpoint. Examples: UULE: Set a region for a search. For example: w+CAIQICINUGFyaXMsIEZyYW5jZQ. You can find an online UULE generator here: NUM: Number of results HL: Host Language. For example: DE GL: Boosts matches whose country of origin matches the parameter value. For example: DE IE: Character encoding how the engine interpret the query string. For example: UTF8 OE: Character encoding used for the results. For example: UTF8 START: Set the starting offset in the result list. When start=10 set the first element in the result list will be the 10th search result (meaning it starts with page 2 of results if the "num" is 10)

Last updated