Keyword Search Volume API: Get Monthly Volume, CPC and Competition
Get Google keyword search volume, monthly trends, CPC and advertiser competition with an API. Includes Python, cURL, real results and APIMaster cost estimates.
Published
A keyword search volume API turns a list of search terms into structured demand data: average monthly searches, historical monthly volumes, CPC and advertiser competition. On APIMaster, use POST /v1/dataforseo/keywords_data/google_ads/search_volume/live with your existing Bearer API key, an explicit country and language, and a JSON array containing one task.
You can open the keyword search volume API, inspect the parameters and request a free cost estimate before executing. Execution uses wallet balance; GPT trial credit and model subscriptions do not cover these data calls. A model-restricted key must allow dataforseo. There is no single per-keyword price assumed in this guide: your request parameters and account pricing determine the estimate and final fee.
The December 1, 2026 example below returns 30 average monthly searches for keyword search volume api, 390 for google serp api, and 320 for dataforseo api in the United States, English. These are keyword-demand estimates, not visits to a website or traffic promised to a new article.
GPT Trial(GPT-6 Astra, GPT-6 Sol, GPT-5.6, GPT-5.5, gpt-5.6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-6.1-sol, gpt-6-astra, gpt-6-sol, gpt-6-luna, gpt-6.2-astra, and gpt-6.2-sol available)
Sign up and claim a $10 GPT trial
What does a keyword search volume API return?
Use this API when you already have candidate keywords and want to compare demand. It does not discover your competitors' ranking pages, return Google's top ten links or measure your own website's clicks.
| Response field | Meaning | How to use it |
|---|---|---|
search_volume |
Approximate average monthly searches for the selected scope and period | Compare demand among relevant topics |
monthly_searches |
Individual historical months with year, month and search_volume |
Check seasonality and recent changes |
cpc |
Estimated advertising cost per click, in USD for this API | Assess advertiser interest; do not treat it as API cost or revenue |
competition |
Advertising competition label, such as LOW or MEDIUM |
Compare paid-search competition |
competition_index |
Advertising competition index from 0 to 100, when available | Add a numeric paid-search signal |
low_top_of_page_bid / high_top_of_page_bid |
Historical estimates for top-of-page ad bids | Understand the advertising bid range |
Advertising competition is not organic keyword difficulty. A term can have few advertisers and still be hard to rank for because the first page contains strong official documentation. Similarly, a $16 CPC does not mean you pay $16 to query the API or earn $16 from a visitor.
Keep null values as missing data. An unavailable CPC is not a zero-dollar CPC, and a keyword without data is not proof that nobody searches for it. Google Ads can also group close variants; adding their volumes may overstate distinct demand.
Choose the API and set the country and language
The DataForSEO API catalog contains several keyword-related operations. For the task in this article, choose Google Ads search volume — Live, not a SERP API or an AI keyword-volume API. Here, “Live” describes how you receive the response; it does not mean the search-volume figures update every second.
Use API Base https://apimaster.ai/v1 and append /dataforseo/keywords_data/google_ads/search_volume/live. The request body is an array of task objects, rather than a Chat Completions request with model and messages.
| Parameter | This example | Why it matters |
|---|---|---|
keywords |
Three English phrases | Up to 1,000 keywords per task; each phrase has at most 80 characters and 10 words |
location_code |
2840 |
United States; omitting location requests worldwide results |
language_code |
en |
English; this does not translate the submitted keywords |
search_partners |
false |
Keep the scope to Google search sites, excluding search partners |
For Japan or South Korea, select the corresponding country and language and supply Japanese or Korean keywords. Do not compare an English worldwide request with a Japanese country-level request as if they measured the same audience. Retrieve supported locations and languages from the catalog when choosing other markets.
By default, historical data covers the preceding 12 months when available. Optional date_from and date_to select a supported historical range; current-month data is unavailable and the newest completed month can lag. Our December 1 response's latest month was October 2026, not November or December.
Try it with cURL: estimate first, then execute
Register, add wallet balance, and create an API key. Store the key in an environment variable on your server. These examples need cURL; the Python example below also needs requests.
Set a new request key for a new logical execution, and keep it with the exact request parameters if you need recovery. The example label below is a placeholder for your job identifier. Do not change it merely because a request times out.
export APIMASTER_API_KEY="YOUR_APIMASTER_API_KEY"
export KEYWORD_VOLUME_REQUEST_KEY="kw-volume-us-en-job-001"
First, request a free estimate. This does not execute the keyword lookup or create a consumption log:
curl --fail-with-body "https://apimaster.ai/v1/dataforseo/keywords_data/google_ads/search_volume/live" \
-H "Authorization: Bearer $APIMASTER_API_KEY" \
-H "Content-Type: application/json" \
-H "X-APIMaster-Cost-Mode: quote" \
--data '[{"keywords":["keyword search volume api","google serp api","dataforseo api"],"location_code":2840,"language_code":"en","search_partners":false}]'
Read estimated_cost_usd and currency from the estimate. An estimate is not a spending cap; the final charge can differ. When you decide to execute, remove the quote header and add Idempotency-Key:
curl --fail-with-body --include \
"https://apimaster.ai/v1/dataforseo/keywords_data/google_ads/search_volume/live" \
-H "Authorization: Bearer $APIMASTER_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $KEYWORD_VOLUME_REQUEST_KEY" \
--data '[{"keywords":["keyword search volume api","google serp api","dataforseo api"],"location_code":2840,"language_code":"en","search_partners":false}]'
Save X-APIMaster-Request-ID, X-APIMaster-Settlement-Status, and, when settled, X-APIMaster-Cost-USD. These headers describe the platform request and fee; the JSON response's native cost field is not your APIMaster billing receipt. Settled consumption appears in usage logs under dataforseo.
Python example: parse the task results and monthly history
Run python -m pip install requests, then use the environment variables above. This script asks for an estimate and waits for confirmation before one execution. It does not automatically retry a paid request.
import os
import requests
base = "https://apimaster.ai/v1"
url = f"{base}/dataforseo/keywords_data/google_ads/search_volume/live"
headers = {
"Authorization": f"Bearer {os.environ['APIMASTER_API_KEY']}",
"Content-Type": "application/json",
}
payload = [{
"keywords": ["keyword search volume api", "google serp api", "dataforseo api"],
"location_code": 2840,
"language_code": "en",
"search_partners": False,
}]
quote = requests.post(
url, headers={**headers, "X-APIMaster-Cost-Mode": "quote"},
json=payload, timeout=60,
)
quote.raise_for_status()
estimate = quote.json()
print("Estimate:", estimate["estimated_cost_usd"], estimate["currency"])
if input("Execute this paid lookup? Type yes: ").strip() != "yes":
raise SystemExit("Stopped after the free estimate.")
# Keep this job's key and payload unchanged for recovery.
request_key = os.environ["KEYWORD_VOLUME_REQUEST_KEY"]
response = requests.post(
url, headers={**headers, "Idempotency-Key": request_key},
json=payload, timeout=180,
)
print("Request ID:", response.headers.get("X-APIMaster-Request-ID"))
print("Settlement:", response.headers.get("X-APIMaster-Settlement-Status"))
print("Charged USD:", response.headers.get("X-APIMaster-Cost-USD"))
response.raise_for_status()
data = response.json()
if data.get("status_code") != 20000:
raise RuntimeError(data.get("status_message", "Lookup failed"))
for task in data.get("tasks") or []:
if task.get("status_code") != 20000:
raise RuntimeError(task.get("status_message", "Task failed"))
for row in task.get("result") or []:
print({
"keyword": row.get("keyword"),
"average_monthly_searches": row.get("search_volume"),
"cpc_usd": row.get("cpc"),
"advertiser_competition": row.get("competition"),
"competition_index": row.get("competition_index"),
})
for month in row.get("monthly_searches") or []:
print(month["year"], month["month"], month.get("search_volume"))
The result rows are in tasks[].result[]; this API does not wrap them in result[0].items. Check both HTTP status and task status. An HTTP 200 alone does not prove that every task returned usable keyword data.
Real example: volume, CPC and competition together
These returned values were checked on December 1, 2026, for United States / English / search partners excluded. The data describes search demand, not an APIMaster ranking or conversion result.
| Keyword | Average monthly searches | October 2026 searches | CPC, USD | Advertising competition | Index |
|---|---|---|---|---|---|
keyword search volume api |
30 | 40 | Not provided | LOW | 2 |
google serp api |
390 | 210 | $16.18 | MEDIUM | 37 |
dataforseo api |
320 | 320 | $10.80 | MEDIUM | 49 |
This small example shows why one column is not enough. google serp api has the largest average demand, but October's 210 searches are below its 390 average. keyword search volume api is smaller and has missing CPC; it may still match a developer's precise integration need. The branded dataforseo api query can favor official navigation and documentation, so volume alone does not establish an easy content opportunity.
Before publishing, inspect the actual search results for each candidate. Are users looking for a tool, code, pricing or an official login? Match that intent, then measure your own search clicks, attributable registrations and subsequent paid top-ups. Search volume cannot predict those outcomes by itself.
Batch keywords, manage cost and recover requests
Deduplicate keywords before submission and group them by country, language and search-network settings. Submit up to 1,000 keywords in one task; split larger lists into separate requests with separate saved request keys. A larger batch is not guaranteed to be proportionally cheaper: request a new estimate for each actual batch instead of multiplying a small example's price.
After execution, use the saved request ID to retrieve the original result and settlement state:
curl --fail-with-body "https://apimaster.ai/v1/data-requests/YOUR_REQUEST_ID" \
-H "Authorization: Bearer $APIMASTER_API_KEY"
If a timeout hid the request ID, recover by the original Idempotency-Key through GET /v1/data-requests/by-key/{request_key}. The same account must authenticate the lookup. A pending settlement is not a confirmed free call; do not start another paid execution with a fresh key just to obtain its result. Reusing a key with changed parameters returns a conflict.
For a 403, check whether the key allows dataforseo. For a 402, check wallet balance and the key's remaining quota against the estimate. If consumption is missing from your log view, clear restrictive filters or select the exact dataforseo model name, and check the request's settlement status. Token-name filters can also distinguish uppercase and lowercase names.
Start a keyword research workflow on APIMaster
Use the keyword search volume API to validate a short, relevant list first. Then pair demand data with the Google search results API to understand competing pages and search intent. These are different operations and each execution has its own cost.
Create your APIMaster account, add wallet balance, then create an API key. Use https://apimaster.ai/v1, allow dataforseo if your key restricts models, request a free estimate, and execute only the workload you intend to buy. The separate GPT trial promotion does not include keyword-data calls.
FAQ
What is a keyword search volume API?
It accepts keywords and returns structured estimates of search demand for a selected market, including average monthly volume, historical monthly volumes, CPC and advertiser competition when available.
Is keyword search volume the same as website traffic?
No. Search volume estimates total demand for a term. Your site's clicks depend on ranking, intent, search-result features and other factors. Actual clicks and registrations require your own analytics.
Does low competition mean a keyword is easy to rank for?
No. The Google Ads competition fields describe advertisers. Evaluate organic search results and an appropriate keyword-difficulty metric separately before deciding what to publish.
Can I get search volume for free?
APIMaster's quote mode provides a free cost estimate, not free keyword results. Execution uses wallet balance. GPT trial credit and model subscriptions do not cover DataForSEO calls.
How many keywords can I send, and why is CPC sometimes missing?
This API supports up to 1,000 keywords per task, with at most 80 characters and 10 words per phrase. Missing CPC means the metric was unavailable for that request; preserve it as missing instead of replacing it with zero.
Does Live return this month's searches, and can I retry after a timeout?
Live returns the task response directly; the underlying monthly metrics still have a reporting delay and exclude the current month. After a timeout, recover with the original request ID or saved idempotency key instead of generating a fresh paid request.
Documentation and related guides
Keyword search volume API reference · DataForSEO API catalog · Google search results API · API key setup
