Stay organized with collections
Save and categorize content based on your preferences.
Here's a sample query to the MerchantPerformanceView that returns the
performance of your account over the last 30 days, segmented by program and
offer_id. You can try this quick example to get familiar with the Reports service.
Click Run to try the sample in the API Explorer. After you click
Run, update the merchant ID placeholder to your own merchant ID in the
request URL. You can modify the query. The full query must remain on one line to
work with the API explorer.
HTTP request URL
The request consists of an HTTP POST to the Content API for Shopping server at
the following URL:
Here is a complete example showing the report definition above enclosed within
an HTTP POST request:
POST/v2.1/merchantId/reports/searchHTTP/1.1Host:shoppingcontent.googleapis.comUser-Agent:curlContent-Type:application/jsonAccept:application/jsonAuthorization:Bearer access tokenParameters:{"query":"SELECT segments.program, segments.offer_id, metrics.impressions, metrics.clicks, metrics.ctr FROM MerchantPerformanceView WHERE segments.date BETWEEN '2020-11-01' AND '2020-11-30'"}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-16 UTC."],[[["The Merchant API is the new version of the Content API for Shopping and represents the future of the platform."],["You can use the Merchant API to retrieve performance data, such as impressions, clicks, and CTR, segmented by program and offer ID."],["A sample query is provided to demonstrate how to retrieve performance data for the last 30 days using the `MerchantPerformanceView`."],["It's recommended to use one of the client libraries instead of directly making HTTP requests to the Content API for Shopping."]]],["The beta version of the Merchant API, the new Content API for Shopping, is introduced. To use the `Reports` service, users with the Reporting manager role can query the `MerchantPerformanceView` for account performance. A sample query using Merchant Center Query Language is provided to retrieve data on `program`, `offer_id`, `impressions`, `clicks`, and `ctr` between '2020-11-01' and '2020-11-30'. Users can run the sample via the API Explorer, updating the merchant ID and modifying the query.\n"]]