AI Keyword Generation API

Quickstart

cURL
curl --location 'https://keywordresearch.api.kwrds.ai/ai' \
--header 'X-API-KEY: YOUR_API_KEY_GOES_HERE' \
--header 'Content-Type: application/json' \
--data '{
"search_question": "digital marketing",
"search_country": "en-US",
"prompt": "Get_Longtail_Keywords"
}'

To increase your API limits, please choose your plan right from our pricing page.

Introduction

The AI Keyword Generation API allows you to generate keyword ideas using advanced AI algorithms. This endpoint provides various options to generate different types of keywords, including long-tail keywords, seed keywords, and more. The generated keywords come with search volumes, CPC, search intent, and competition level data.

Endpoint

POST /ai

This endpoint generates AI-powered keyword ideas based on the provided prompt type.

Example Request

Here's an example of how to use the AI Keyword Generation API with cURL:

cURL
curl --location 'https://keywordresearch.api.kwrds.ai/ai' \
--header 'X-API-KEY: YOUR_API_KEY_GOES_HERE' \
--header 'Content-Type: application/json' \
--data '{
"search_question": "digital marketing",
"search_country": "en-US",
"prompt": "Get_Longtail_Keywords"
}'

Request Body

  • search_question: (Required) The main keyword or topic for which you want to generate ideas.
  • 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. Pass en-worldwide to get the global search volume. Default is en-US.
  • prompt: (Required) The type of keyword ideas you want to generate. You can choose between these options:
  1. Get_Longtail_Keywords: Generates long-tail keywords.
  2. Get_Good_Seed_Keywords: Generates good seed keywords.
  3. Get_Bad_Seed_Keywords: Generates bad seed keywords.
  4. Get_Related_Keywords: Generates related keywords.
  5. Get_Broad_Keywords: Generates broad keywords.
  6. Get_Ecommerce_Keywords: Generates ecommerce keywords.
  7. Get_Best_Keyword_ideas: Generates best keyword ideas.
  8. Get_Buy_Keyword_Ideas: Generates buy keyword ideas.
  9. Get_Price_Keyword_Ideas: Generates price keyword ideas.
  10. Get_Near_me_Keyword_Ideas: Generates near me keyword ideas.
  11. Get_Reviews_Keyword_Ideas: Generates reviews keyword ideas.
  12. Get_Top_of_Funnel_Keywords: Generates top of funnel keyword ideas.
  13. Get_Middle_of_Funnel_Keywords: Generates middle of funnel keyword ideas.
  14. Get_Bottom_of_Funnel_Keywords: Generates bottom of funnel keyword ideas.
  15. Ai_keywords: Generates AI-powered keyword ideas.

Headers

  • X-API-KEY: (Required) Your API key for authentication. Replace YOUR_API_KEY_GOES_HERE with your actual API key.

Example Response

The API returns a JSON array containing detailed metrics for the generated keywords. Here's an example response:

JSON
[
{
"keyword": "long tail digital marketing strategies",
"volume": 1900,
"cpc": 3.45,
"search-intent": "Informational",
"competition_value": "MEDIUM",
"Source": "AI"
},
{
"keyword": "digital marketing for small local businesses",
"volume": 2400,
"cpc": 4.12,
"search-intent": "Commercial",
"competition_value": "HIGH",
"Source": "AI"
},
{
"keyword": "affordable digital marketing services",
"volume": 3200,
"cpc": 5.67,
"search-intent": "Transactional",
"competition_value": "HIGH",
"Source": "AI"
}
]

Response Structure

Each object in the response array contains:

  • keyword: The generated keyword idea.
  • volume: The estimated monthly search volume for the keyword.
  • cpc: The estimated cost-per-click for the keyword.
  • search-intent: The inferred search intent for the keyword.
  • competition_value: The competition level for the keyword.
  • Source: The source of the keyword data (always "AI" for this endpoint).

Use Cases

The AI Keyword Generation API can be used in various scenarios:

  1. Content Strategy: Generate ideas for blog posts, articles, and other content types.
  2. SEO Planning: Discover new keyword opportunities for your website optimization efforts.
  3. PPC Campaigns: Find potential keywords for your paid advertising campaigns.
  4. Market Research: Explore different aspects of a topic or industry using various prompt types.

Best Practices

  • Experiment with Prompts: Try different prompt types to get a diverse range of keyword ideas.
  • Localization: Use the search_country parameter to get region-specific keyword ideas.
  • Combine with Other Endpoints: Use the AI-generated keywords as input for other endpoints like /keywords-with-volumes for more detailed analysis.

Error Handling

The AI Keyword Generation 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.
  • 429 Too Many Requests: You have reached the limit for AI keyword generation requests.

Next Steps

Now that you're familiar with the AI Keyword Generation API, you can start integrating it into your projects to enhance your keyword research and content planning processes.

For further questions or support, please contact hello@kwrds.ai.