competitor_get_paid_keywords
Competitor research read low risk
Part of the Competitor Keywords Agent.
What it does
A competitor's paid keywords - the Ahrefs Paid Keywords export, automated - on the user's own SpyFu or SE Ranking account, connected under Competitor data in the Scalix console (ADR-103). Returns {provider, domain, source_database, max_position, keywords[]} plus the cost. On SpyFu (rows_charged, usd_charged at list price) each keyword carries `keyword`, `position`, `search_volume`, `advertisers_on_term`, `difficulty`, an `ad` object with the competitor's verbatim `headline` and `description` as SpyFu observed them serving, and `source_row`; CPC is deliberately null there, so pass the keywords to gads_keyword_ideas for Google's own volume and top-of-page bid. SpyFu also reads the competitor's most recently seen ads (`history_rows`, default 100) and returns the further terms those ads showed on as `more_keywords` - each with `keyword`, `last_seen` (the month SpyFu last saw an ad on it) and `ads_seen`, ranked by ads_seen, no volume, CPC or position - plus `more_keywords_found` and `ads_read`. That is SpyFu's depth: on rillet.com 67 paid-SERP keywords against 8,771 terms in its 1,000 most recent ads (measured 2026-10-13). On SE Ranking one request reads up to 1,000 paid keywords (credits_charged: 100 per request, 0 per row) and lists the `limit` with the most traffic, with `keywords_indexed` and `keywords_kept` as the totals; each keyword carries `keyword`, `position`, `previous_position`, `search_volume`, `cpc`, `competition`, `difficulty`, `traffic`, `landing_page` and `ad` - the competitor's paid ad on that keyword, verbatim (headline, description, display_url), when the data has one. Volume, CPC and difficulty are the vendor's modelled estimates, NOT Google data. Defaults to ad positions 1-5, the strategist's own filter. With nothing connected it returns not_configured naming the console step and the manual export; a key the vendor rejects comes back needs_reauth and turns the console card amber. Read-only.
When to use it
Use to get a competitor's paid keywords with the positions they hold — the Ahrefs step of a competitor analysis. Run competitor_get_keyword_gap first to decide which competitors deserve this deeper pull. Follow it with gads_keyword_ideas on their product pages for Google's own view of the same territory. Not for a competitor's ads: use competitor_get_transparency_ads.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | yes | The competitor's bare domain, e.g. 'competitor.com'. A scheme, 'www.' or a path is stripped; anything without a dot is rejected. |
source | string | no | The market. SpyFu: two-letter country code, e.g. 'US' (default), 'UK', 'DE', 'AU' - 28 markets. SE Ranking: regional database, e.g. 'us' (default), 'uk', 'de'. Match the market the competitor advertises in: a domain with no data in one market may be busy in another. |
max_position | integer | no | Keep only keywords where the competitor ranks at or above this ad position. Default 5, matching the strategist's own Position 1-5 filter. Pass 0 to keep every position. |
page | integer | no | 1-based page number. SpyFu: converted to its starting row. SE Ranking: its page, 100 credits each. |
limit | integer | no | Rows to return. SpyFu: 1-10000 (default 200), billed per row, so a smaller limit costs less; it also caps how many `more_keywords` are listed. SE Ranking: the tool always reads up to 1,000 rows in one request (100 credits whatever the count) and lists this many with the most traffic (default 200). |
provider | string | no | 'spyfu' or 'seranking'. Leave it out to use whichever the user connected under Competitor data in the Scalix console (SpyFu first when both are). |
history_rows | integer | no | SpyFu only: how many of the competitor's most recently seen ads to read for `more_keywords` (default 100, max 1000; 0 turns it off). $3.00 per 1,000 ads at SpyFu's list price, on the user's own plan. |
Safeguards
Policy
Third-party estimates, not platform truth: never blend volume, CPC or difficulty into Google Ads figures, and name the vendor only in the internal evidence note: a client report names no data source, vendor or tool. A competitor's ad copy is for analysis only - quote it verbatim and attributed to the competitor, and never reuse it in the client's own ads. An empty result means nothing was indexed for that market, never that the competitor runs no ads; a client report says 'No indexed paid KWs'.
Reminder
Read-only; runs on the user's own vendor plan (SpyFu bills per row, SE Ranking 100 credits per request), so ask for what you need. Keys travel only as request headers and never appear in a URL or the response.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
not_configured | No SpyFu or SE Ranking account is connected to the user's Scalix account. | Connect SpyFu or SE Ranking under Competitor data in the Scalix console - searches run on the user's own plan and credits. Until then, open SpyFu -> PPC Research -> PPC Keywords (or SE Ranking -> Competitive Research -> Paid Search), export the competitor's paid keywords and paste them, noting in the evidence note that this competitor was collected manually. | no |
invalid_argument | The domain was not a domain, the provider is unknown, or a parameter was malformed. | Pass a bare domain such as 'competitor.com', provider 'spyfu' or 'seranking' (or none), and a market code. | no |
needs_reauth | The vendor rejected the key connected to the user's Scalix account, or the plan does not include API access. | Paste a new key under Competitor data in the Scalix console: SpyFu -> Account Settings -> API Usage (Pro + AI or Team/Agency - Basic has no API), or SE Ranking -> Profile & Preferences -> API Dashboard (type Data). The console card turns amber until then. | no |
quota_exhausted | The vendor balance is used up (SE Ranking answers 403 Insufficient funds and does not charge that request). | Top up the SpyFu API balance or the SE Ranking wallet, or open SpyFu -> PPC Research -> PPC Keywords (or SE Ranking -> Competitive Research -> Paid Search), export the competitor's paid keywords and paste them, noting in the evidence note that this competitor was collected manually. | no |
not_found | The vendor has no data for that domain in that market. | Check the domain spelling and try the market code for the competitor's actual market before concluding anything. | no |
rate_limited | The vendor's rate limit was hit. | Back off and retry in a minute. | yes |
platform_unavailable | The vendor was unreachable or returned a server error. | Retry in a minute; if it persists, collect this competitor manually and say so in the evidence note. | yes |
Edge cases
- The account used is in `provider`. SpyFu goes first when both are connected; pass provider='seranking' to use SE Ranking.
- SpyFu: ad copy arrives on the keyword row under `ad` (headline, description, position, advertisers_on_term, last_seen) - only for keywords SpyFu has an observed ad for, so some rows have `ad: null`. SE Ranking returns no ad copy.
- SpyFu: CPC is always null by design; take it from gads_keyword_ideas, which returns Google's own top-of-page bid.
- SpyFu: `last_seen` carries the row's `dateSearched`, and old dates are common - never call such an ad current. For 'is this live now', use competitor_get_transparency_ads or competitor_get_brand_serp.
- SpyFu: `more_keywords` come from ads, not from paid-SERP rows, so they have no volume, CPC or position; a failed ad-history read keeps the keyword rows and says so in a warning.
- SE Ranking: `landing_page` is its documented `url` for the keyword; confirm it against competitor_get_transparency_ads before calling it the paid landing page.
- Positions below max_position are dropped and the count of dropped rows is reported; pass max_position=0 to keep them.
- An empty keyword list means nothing was indexed for that market, NOT that the competitor runs no ads - try another market code.
- Volume, CPC and difficulty are modelled estimates and will not reconcile to Google Ads figures.
- The vendor row is returned untouched under source_row, so an unmapped field is still available.