> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# Why did my SEO API request return 400 bad_request for a URL, country, language, or filter?

> SEO endpoints reject unknown fields, unsupported country/language pairs, country/language on backlink/DR/traffic tools, and % or _ in contains; full URLs are automatically reduced to their domain.

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`

1. **Sending `country` or `language` to a marketless tool:**
   * **Accept `country` and `language`:** `keyword-overview`, `keyword-ideas`, `keyword-difficulty`, `domain-overview`, `ranked-keywords`, `top-pages`, `competitors`.
   * **Reject `country` and `language`:** `backlink-summary`, `backlinks`, `domain-rating`, `domain-rating-history`, `site-traffic`.
2. **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.
   * `language` must belong to that market (for example, `es` is valid in `us`, `zh-TW` in `hk`, while `de` in `us` returns `400` and lists the allowed languages in `error.message`).
3. **Wildcards in `ranked-keywords.contains`:**
   * `contains` does case-insensitive substring matching up to 80 characters and rejects `%` and `_`. Pass plain text such as `"cluster"`, not `"%cluster%"`.
4. **Unknown or misspelled request fields:**
   * Extra fields (such as `max_results` instead of `limit`, or `url` instead of `domain`) are rejected so you never get an answer to a different question than you asked.

## 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](/seo) and [BeatAPI SEO Data API](https://beatapi.io/seo).

## Related

* [Missing search volume and China coverage](/faq/seo-missing-volume) · [Timeouts & retries](/faq/seo-timeout-and-double-charge)

[Back to SEO questions](/faq/seo).