You can get all the product details from Google Content API for shopping, including the price of the product. Below is a code snippet to retrieve details of a single product:
/**
* Retrieves the product with the specified product ID from the Content API for Shopping
Server.
*
* @param productId The ID of the product to be retrieved.
* @return The requested product.
* @throws HttpResponseException if the retrieval was not successful.
* @throws IOException if anything went wrong during the retrieval.
*/
private Product getProduct(String productId)
throws IOException, HttpResponseException {
// URL
String url = rootUrl + userId + "/items/products/schema/" + productId;
// HTTP request
HttpRequest request = requestFactory.buildGetRequest(new GoogleUrl(url));
// execute and interpret result
return request.execute().parseAs(Product.class);
}
You need to write a Product model class for the above code. The class looks like:
/**
* Class for representing a product entry.
*/
public class Product extends BatchableEntry {
@Key("sc:additional_image_link")
public List<String> additionalImageLinks;
...
@Key("scp:price")
public Price price;
...
@Key("scp:product_type")
public String productType;
@Key("scp:quantity")
public Integer quantity;
...
...
}
You can download the whole source code and get the explanation of the code from this example provided by Google Developers.