“API: keyword_match”
Generates a list of related keywords, suggestions and matching terms from a seed keyword and a geographic location.
- Cost: 1 API credit per successful call.
- Module: Keyword Tools
- REST endpoint:
POST https://api.ranki.co/v1/keyword-match
What it’s for
keyword_match is the core tool for keyword research and semantic expansion. From a seed term (for example, "zapatos de running") and a target country, it returns dozens of variants and long-tail terms with their monthly volume, cost per click (CPC), competition level and keyword difficulty (KD).
The filters are the same as in the Keyword Match UI (keyword contains / doesn’t contain, volume, difficulty and word count). DataForSEO applies them before paginating, across the full set of suggestions (often hundreds of thousands of terms). Without a filter, page 1 is the top 50 by volume, and ambiguous seeds (cajero, chofer, mesero) fill up with navigational or commercial noise.
API parameters
- Operation:
keyword_match - Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
keyword | string | Yes | – | Seed keyword to expand (e.g. "zapatos de running"). |
location | string | Yes | – | Country or market name (e.g. "Colombia", "Spain", "United States"). |
page | integer | No | 1 | Page number (returns up to 50 results per page). |
order | string | No | "vol-desc" | Sort order ("vol-desc" for highest volume first, "vol-asc", "kwd-desc", etc.). |
keyword_filter_text | string | No | – | Comma-separated terms for the keyword filter (same as the UI). Applied across the full set of suggestions, not to the page of 50. |
keyword_filter_contains | string | No | "regex" | "regex" / "contains" / "like" = contains; "not_regex" / "not_contains" / "not_like" = no contiene. Solo tiene efecto si hay keyword_filter_text. |
kw_min_vol | integer | No | – | Minimum search volume. |
kw_max_vol | integer | No | – | Maximum search volume. |
kd_min_difficulty | integer | No | – | Minimum difficulty (0–100). |
kd_max_difficulty | integer | No | – | Maximum difficulty (0–100). |
wc_words | integer | No | – | Exact number of words. |
Endpoint
POST https://api.ranki.co/v1/keyword-match
Authorization: Bearer rk_TU_CLAVE_AQUI
Content-Type: application/json
{
"keyword": "cajero",
"location": "Mexico",
"page": 1,
"order": "vol-desc",
"keyword_filter_text": "cajero",
"keyword_filter_contains": "regex"
}
Example with curl
curl -s -X POST \
-H "Authorization: Bearer rk_TU_CLAVE_AQUI" \
-H "Content-Type: application/json" \
-d '{
"keyword": "cajero",
"location": "Mexico",
"page": 1,
"order": "vol-desc",
"keyword_filter_text": "cajero",
"keyword_filter_contains": "regex"
}' \
"https://api.ranki.co/v1/keyword-match"
Sample response
{
"credits_consumed": 1,
"credits_remaining": 249,
"data": {
"items": [
{
"keyword": "mejores zapatos de running",
"search_volume": 4400,
"cpc": 0.45,
"competition": 0.32,
"keyword_difficulty": 38
},
{
"keyword": "zapatos de running para asfalto",
"search_volume": 1200,
"cpc": 0.38,
"competition": 0.28,
"keyword_difficulty": 32
}
],
"total_count": 86
}
}
Response fields
| Field | Type | Description |
|---|---|---|
credits_consumed | integer | Credits deducted by the operation (1 credit). |
credits_remaining | integer | Remaining API credit balance after the call. |
data.items | array | List of keywords found. |
items[].keyword | string | Suggested term. |
items[].search_volume | integer | Estimated monthly search volume in the location. |
items[].cpc | number | Estimated cost per click in search ads (USD). |
items[].competition | number | Ad competition level (0.0 to 1.0 scale). |
items[].keyword_difficulty | integer | Estimated organic difficulty (KD, 0 to 100 scale). |
data.total_count | integer | Total number of suggestions available for this term. |