Why did my SEO API request return 400 bad_request for a URL, country, language, or filter?
Why did my SEO API request return 400 bad_request for a URL, country, language, or filter?
BeatAPI SEO endpoints validate every request strictly and return 400 bad_request (at $0 cost) instead of silently dropping invalid fields. Most 400 errors come from sending country/language to a global endpoint, pairing an unsupported language with a country, using SQL wildcards in contains, or misspelling a field name.
The four most common causes of 400 bad_request
- Sending
countryorlanguageto a marketless tool:- Accept
countryandlanguage:keyword-overview,keyword-ideas,keyword-difficulty,domain-overview,ranked-keywords,top-pages,competitors. - Reject
countryandlanguage:backlink-summary,backlinks,domain-rating,domain-rating-history,site-traffic.
- Accept
- Unsupported country or country–language pair:
- Around 90 Google markets are covered (two-letter lowercase code such as
us,gb,de,jp); China (cn) is not supported. languagemust belong to that market (for example,esis valid inus,zh-TWinhk, whiledeinusreturns400and lists the allowed languages inerror.message).
- Around 90 Google markets are covered (two-letter lowercase code such as
- Wildcards in
ranked-keywords.contains:containsdoes case-insensitive substring matching up to 80 characters and rejects%and_. Pass plain text such as"cluster", not"%cluster%".
- Unknown or misspelled request fields:
- Extra fields (such as
max_resultsinstead oflimit, orurlinstead ofdomain) are rejected so you never get an answer to a different question than you asked.
- Extra fields (such as
How domains and URLs are normalized
You do not need to strip protocols manually for domain: passing a full URL such as https://www.redis.io/docs/cluster/ is automatically reduced to redis.io (removing the scheme, path, and leading www.). Check the echoed domain field in the response to confirm what was queried.
For full field tables, see the SEO API reference and BeatAPI SEO Data API.

