Keyword Research API
Quickstart
curl --location 'https://keywordresearch.api.kwrds.ai/keywords-with-volumes' \--header 'X-API-KEY: YOUR_API_KEY_GOES_HERE' \--header 'Content-Type: application/json' \--data '{"search_question": "facet","search_country": "en-US"}'
To increase your API limits, please choose your plan right from our pricing page.
Introduction
The Keyword Research API allows you to retrieve valuable data about specific keywords, including search volume, cost-per-click (CPC), search intent, and competition level. This data is essential for planning effective SEO and PPC campaigns. The Keyword Research API provides detailed metrics for keywords, helping you understand how often a keyword is searched, the cost to target it with paid ads, and the level of competition for that keyword. This data is crucial for making informed decisions in your digital marketing strategies.
Watch kwrds.ai API integration
Embed our data in your own application quickly and get started with your keyword research.
Read our full case study on Keyword Research to learn more about how to use them to boost your SEO strategy.
Endpoint
POST /keywords-with-volumes
This endpoint retrieves detailed keyword metrics including search volume, CPC, search intent, and competition level.
Example Request
Here’s an example of how to use the Keyword Research API with cURL
:
curl --location 'https://keywordresearch.api.kwrds.ai/keywords-with-volumes' \--header 'X-API-KEY: YOUR_API_KEY_GOES_HERE' \--header 'Content-Type: application/json' \--data '{"search_question": "facet","search_country": "en-US"}'
Request Body
search_question
: (Required) The keyword or phrase for which you want to retrieve metrics. This should be a string.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
.limit
: (Optional) The maximum number of keywords to return. Default isundefined
, which returns all keywords.
Headers
X-API-KEY
: (Required) Your API key for authentication.Content-Type
: (Required) The content type of the request, which should beapplication/json
.
Example Response
The API returns a JSON object containing detailed metrics for the specified keyword. Here’s an example response:
{"keyword": {"0": "test","1": "example"},"volume": {"0": 201000,"1": 50000},"cpc": {"0": 0.0,"1": 1.9035980231},"avg_monthly_searches": {"0": [{"January": 20000,"February": 18000,"March": 22000},{"January": 12000,"February": 15000,"March": 13000}]},"search-intent": {"0": "General","1": "Informational"},"competition_value": {"0": "LOW","1": "MEDIUM"}}
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., "General", "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"
.
💡 Tip: In a case of a Google downtime, we will use different vendors to get your data from. In such rare cases, The
avg_monthly_searches
andcompetition_value
might beundefined
, hence you will want to make sure to accommodate for this in your application.
Use Cases
The Keyword Research API can be used in various ways:
- SEO Planning: Use the keyword volume and competition data to identify high-value keywords that are worth targeting.
- PPC Campaigns: Leverage CPC data to budget and plan paid advertising campaigns effectively.
- Content Strategy: Analyze search intent to create content that aligns with what users are looking for.
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 Keyword Research 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. - 5XX 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 Keyword Research API, you can start integrating it into your projects.
For further questions or support, please contact hello@kwrds.ai.