get_query_to_url
Join Google Search Console queries with Shopify product sales — answers questions that pure SEO or pure sales tools can't. Reports: by_url (given a product URL, return its top driving organic queries plus the matching product's sales/orders/refunds and an implied click-to-purchase rate), unconverting_pages (URLs that received >= minClicks organic clicks but the matching product sold <= maxSales units in the same window — flags 'SEO-visible-but-not-converting' listings), top_pages_with_sales (top organic pages joined with their product sales, ranked by clicks × orderCount so high-throughput pages surface). For unconverting_pages and top_pages_with_sales, only product URLs (matching /products/{handle}) are joined to sales — collection pages and blog posts are not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | For by_url: the exact URL as it appears in Search Console (https:// included, with or without trailing slash to match how GSC indexed it). | |
| limit | No | Number of results (by_url: top queries to return; unconverting_pages / top_pages_with_sales: max URLs returned). Default 20. | |
| report | Yes | Report type | |
| _offset | No | Pagination offset. If a response includes _pagination.hasMore=true, use _offset to fetch the next page. | |
| endDate | No | End date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day — today is excluded by default to avoid partial-day totals; pass an explicit endDate to include today). | |
| maxSales | No | For unconverting_pages: maximum units sold for the matched product in the same window (default 2). 0 means 'pages with zero sales only'. | |
| minClicks | No | For unconverting_pages: minimum organic clicks for a URL to be considered (default 50). Lower for low-traffic stores; raise to focus on bigger problems. | |
| startDate | No | Start date (YYYY-MM-DD). Defaults to a 30-day window ending yesterday. |