Search Volume API
Quickstart
curl --location 'https://keywordresearch.api.kwrds.ai/search-volume' \--header 'X-API-KEY: YOUR_API_KEY_GOES_HERE' \--header 'Content-Type: application/json' \--data-raw '{"keywords": ["google","amazon","microsoft"],"search_country": "en-US"}'
Introduction
The Search Volume API endpoint allows you to retrieve search volume data for multiple keywords in a specified country. This is essential for understanding the popularity of keywords in different regions and can be used for keyword research, SEO planning, and digital marketing strategies.
To increase your API limits, please choose your plan right from our pricing page.
Endpoint
POST /search-volume
This endpoint retrieves the search volume for a list of keywords in a specified country.
Request Headers
X-API-KEY
: (Required) Your API key for authentication.Content-Type
: (Required) The content type of the request, which should beapplication/json
.
Request Body Example
The request body should be a JSON object containing the following parameters:
keywords
: (Required) An array of keywords for which you want to retrieve search volume data.search_country
: (Required) The country code (e.g.,en-US
) for which the search should be localized. The first part is the ISO 639-1 language code, and the second part is the ISO 3166-1 alpha-2 country code. Passen-worldwide
to get the global search volume. Default isen-US
.
Note that the
keywords
array can contain up to 5,000 keywords per request. If you need more, please break your request into multiple smaller requests to accommodate the limit.
Example Response
The API returns a JSON object containing the search volume and other related metrics for the specified keywords. Here’s an example response:
{"keyword": {"0": "google","1": "amazon","2": "microsoft"},"volume": {"0": 3010000,"1": 2500000,"2": 2100000},"cpc": {"0": 1.23,"1": 2.34,"2": 3.45},"avg_monthly_searches": {"0": [{"January": 20000,"February": 18000,"March": 22000},{"January": 12000,"February": 15000,"March": 13000}]},"search-intent": {"0": "Navigational","1": "Transactional","2": "Informational"},"competition_value": {"0": "HIGH","1": "MEDIUM","2": "LOW"}}
Response Structure
keyword
: An object where each key represents an index and the value is the keyword string.volume
: An object where each key represents an index and the value is the search volume for the corresponding keyword.cpc
: An object where each key represents an index and the value is the cost-per-click (CPC) for the corresponding keyword.avg_monthly_searches
: An object where each key represents an index and the value is a stringified JSON object containing the average monthly search volume for each month.search-intent
: An object where each key represents an index and the value is the search intent for the corresponding keyword (e.g., "Navigational", "Transactional", "Informational").competition_value
: An object where each key represents an index and the value is the competition level for the corresponding keyword. Possible values are"LOW"
,"MEDIUM"
, and"HIGH"
.
Use Cases
The Search Volume API can be used in various ways:
- Keyword Research: Use the search volume data to identify high-value keywords that are worth targeting in your content and advertising strategies.
- SEO Planning: Leverage the data to optimize your content for keywords that have high search volumes but manageable competition levels.
- PPC Campaigns: Utilize the CPC data to budget and plan paid advertising campaigns effectively.
Best Practices
- Localization: Always specify the
search_country
parameter to get the most relevant results for your target audience. - Parsing
avg_monthly_searches
: Theavg_monthly_searches
data is returned as a stringified JSON. Ensure you parse this data correctly in your application to extract monthly search volumes. - API Key Management: Keep your API key secure and do not expose it in public repositories.
Error Handling
The Search Volume API returns standard HTTP status codes:
- 200 OK: The request was successful, and the data is returned in the response.
- 400 Bad Request: The request was invalid or malformed. Check your request body and parameters.
- 401 Unauthorized: The API key is missing or invalid. Ensure that your
X-API-KEY
header is correct. - 500 Internal Server Error: An error occurred on the server. Retry the request or contact support if the issue persists.
Next Steps
Now that you're familiar with the Search Volume API, you can start integrating it into your keyword research and SEO strategies. For further details, explore the full kwrds.ai documentation or reach out to hello@kwrds.ai for support.
For further questions or support, please contact hello@kwrds.ai.