competitor_import_auction_insights
Competitor research read low risk
Part of the Auction Insights Agent.
What it does
Read a Google Ads Auction Insights export (pasted CSV or a Google Sheet) and turn it into competitor rows, and with a second export report the week-over-week movement. THIS IS THE ONLY WAY TO GET THE COMPETITOR TABLE: rival display domains with impression share, overlap rate, position-above rate, top-of-page rate, abs-top-of-page rate and outranking share are NOT available through the Google Ads API — the metrics are allowlist-only and Google closed that allowlist with no application path, so gads_get_auction_insights can only return the account's OWN impression share. All values are FRACTIONS 0-1 (multiply by 100 for the UI's %). Every metric carries a companion `_note` so the three kinds of unknown stay apart and can never be read as zero: 'below_threshold' (Google printed '< 10%'), 'above_threshold' ('> 90%'), 'no_data' ('--'), and a metric absent from the export has no key at all. The client's own row is flagged is_you. With a prior export you also get comparison[] carrying <metric>_prior and <metric>_delta_pp in PERCENTAGE POINTS, plus status 'new' (absent last period), 'gone' (absent this period) or 'present' — none of which is a zero. A day-segmented export is never averaged into a period figure: impression share has no denominator in the export, so averaging it would invent a number, and the tool says so instead. Returns {success, data:{period_label, source, summary, rows, comparison?}, count, warnings}. Read-only; no Google Ads API call.
When to use it
Use to import the Auction Insights competitor export and to compare two periods of it: who gained or lost impression share, which competitor domains are new, and which have gone. Reach for this whenever the user asks about competitor impression share, overlap rate or outranking share, because the Google Ads API cannot supply those and gads_get_auction_insights returns only the account's own share. If the user has no export yet, tell them how to produce one before calling: Google Ads -> Insights & Reports -> Reports -> Auction Insights -> Download. One-off: copy the CSV into csv_text. Automated: Download -> Schedule, frequency Daily, format Google Sheets, and UNTICK 'Title and date range' and 'Totals'; then pass that sheet's id.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
csv_text | string | no | The export pasted as CSV/TSV text, including its header row. Use this for a one-off. Either csv_text or spreadsheet_id is required. Google Ads -> Insights & Reports -> Reports -> Auction Insights -> Download. One-off: copy the CSV into csv_text. Automated: Download -> Schedule, frequency Daily, format Google Sheets, and UNTICK 'Title and date range' and 'Totals'; then pass that sheet's id. |
spreadsheet_id | string | no | Id of a Google Sheet holding the export — typically the one Google Ads writes on a schedule. Read with the Google connection already linked to Scalix; the sheet must be visible to that account. |
sheet_range | string | no | A1 range to read, default A1:Z1000. Widen it for a long export. |
prior_csv_text | string | no | The previous period's export as pasted text — supply it to get the movement. |
prior_spreadsheet_id | string | no | Google Sheet id for the previous period's export. |
prior_sheet_range | string | no | A1 range for the prior sheet, default A1:Z1000. |
period_label | string | no | How to label this period in the report, e.g. '15-21 Sep'. Cosmetic. |
prior_period_label | string | no | How to label the comparison period, e.g. '8-14 Sep'. Cosmetic. |
Safeguards
Policy
Never present a redacted or missing value as a number. '< 10%' and '> 90%' are Google's privacy buckets, '--' means no data, and an absent column means the export did not carry that metric — report each as unknown, with its kind, rather than as zero or an estimate. Never average a day-segmented export into a period figure: the export carries no eligible-impression denominator, so any such average is fabricated. Join competitors on the exact display domain; shop.example.com and example.com are different advertisers to Google and must not be merged. Reconcile back to the Google Ads UI within +/-1%.
Reminder
Read-only — this parses a file the user exported and changes nothing in any account. Treat competitive data as sensitive and do not retain it beyond this request.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
invalid_argument | Neither csv_text nor spreadsheet_id was supplied, or the two periods are segmented differently. | Pass one export to read, and when comparing make sure both were exported with the same segmentation (both unsegmented, or both by Day). | no |
parse_failed | The text or sheet is not an Auction Insights export — no 'Display URL domain' column was found, or no rows followed the header. | Google Ads -> Insights & Reports -> Reports -> Auction Insights -> Download. One-off: copy the CSV into csv_text. Automated: Download -> Schedule, frequency Daily, format Google Sheets, and UNTICK 'Title and date range' and 'Totals'; then pass that sheet's id. | no |
needs_reauth | Google rejected the credentials, or there is no fresh access token for Sheets. | Reconnect Google (granting Sheets) in the Scalix dashboard. | no |
sheets_error | The spreadsheet could not be read — wrong id, wrong range, or the connected Google account cannot see it. | Check the spreadsheet id and that the connected Google account has access, then retry. | no |
rate_limited | Google Sheets rate limit hit. | Back off and retry. | yes |
Edge cases
- Shopping Auction Insights has no position-above, top-of-page or abs-top columns; those keys are absent entirely and a warning says so.
- Leaving 'Title and date range' or 'Totals' ticked adds preamble and total rows; both are detected and skipped, and the skipped count is reported.
- In a day-segmented export a totals row shifts left, so a percentage can land in the domain cell — a numeric 'domain' is skipped rather than reported as a competitor.
- The client's own row reads 'You' (localised in non-English exports) and is flagged is_you rather than treated as a rival.
- European exports use a comma decimal and a non-breaking space ('12,5 %'); both are handled.
- Unrecognised columns are preserved verbatim under each row's `extra` rather than dropped, so a Google format change loses no data.
- A day-segmented export is reported as granularity 'daily' and is never averaged into a period figure.