Related Keywords API
Quickstart
curl --location 'https://keywordresearch.api.kwrds.ai/related-keywords' \--header 'X-API-KEY: YOUR_API_KEY_GOES_HERE' \--header 'Content-Type: application/json' \--data '{"search_question": "tesla cybertruck","search_country": "en-US"}'
To increase your API limits, please choose your plan right from our pricing page.
Introduction
The Related Keywords API allows you to retrieve a list of keywords related to a given keyword, along with their search volumes, CPC, search intent, and competition level. This data is valuable for expanding your keyword research and discovering new opportunities for your keyword research.
You can use this API endpoint after the Keyword Research API call. Note that you first need to run a keyword research to get the keyword you want to find related keywords for. If a keyword-research
call is needed, the related-keywords
call will automatically run it, and update the keyword research count. Then it will compute related keywords and return the results.
Watch kwrds.ai API integration
Discover how to seamlessly integrate kwrds.ai data into your application and unlock the power of related keywords for your projects.
Read our full guide on Related Keywords to learn more about how to use them to boost your SEO strategy.
Endpoint
POST /related-keywords
This endpoint retrieves related keywords and their metrics for a given keyword.
Example Request
Here's an example of how to use the Related Keywords API with cURL
:
curl --location 'https://keywordresearch.api.kwrds.ai/related-keywords' \--header 'X-API-KEY: YOUR_API_KEY_GOES_HERE' \--header 'Content-Type: application/json' \--data '{"search_question": "tesla cybertruck","search_country": "en-US"}'
Request Body
search_question
: (Required) The keyword for which you want to find related keywords. 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 related keywords. Here's an example response:
{"keyword": {"0": "cybertruck","1": "tesla model y","2": "tesla models",},"volume": {"0": 2240000,"1": 1220000,"2": 301000,},"cpc": {"0": 0.4520327,"1": 2.6365127,"2": 0.54774282,},"search-intent": {"0": "General","1": "General","2": "General"},"competition_value": {"0": "HIGH","1": "HIGH","2": "HIGH"}}
Response Structure
keyword
: An object where each key represents an index and the value is the related keyword.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 for the corresponding keyword.search-intent
: An object where each key represents an index and the value is the search intent for the corresponding keyword.competition_value
: An object where each key represents an index and the value is the competition level for the corresponding keyword.Source
: An object where each key represents an index and the value is the source of the keyword data (typically "Google").
Use Cases
The Related Keywords API can be used in various ways:
- Keyword Expansion: Discover new keyword opportunities related to your main keyword.
- Content Ideation: Use related keywords to generate ideas for new content topics.
- SEO Optimization: Identify related keywords to include in your content for better search engine optimization.
Best Practices
- Localization: Always specify the
search_country
parameter to get the most relevant results for your target audience. - API Key Management: Keep your API key secure and do not expose it in public repositories.
Error Handling
The Related Keywords 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 missing required parameters.
- 401 Unauthorized: The API key is missing or invalid.
- 403 Forbidden: The request is not allowed, possibly due to plan limitations.
- 404 Not Found: No related keywords were found for the given keyword.
- 429 Too Many Requests: You have reached the limit for related keywords requests.
Next Steps
Now that you're familiar with the Related Keywords API, you can start integrating it into your projects to enhance your keyword research capabilities.
For further questions or support, please contact hello@kwrds.ai.