Select Page

AI Keyword Extractor API

Description

If you're just starting with SEO, finding an initial set of keywords for your domain (or specific page) to target can be a really difficult first step as there are unlimited number of options and paths for you to take. Our AI Keyword Extractor endpoint will help you get started on your SEO journey by suggesting a set of keywords based on your website's content.

We use a variety of AI models to best approximate what the URL you specify is all about. Additionally, this endpoint can help you understand the overall linguistic focus of the given URL. The AI generates its output based on the most linguistically relevant words in the body content.

Endpoint Cost

1 token/credit per request

If the analyze flag is set to true, the pricing change to 1 token/credit per keyword found if it is not cached in our database (see details below).

Endpoint

> POST https://api.jsonrepo.com/v1/seo/ai_keyword_extractor

Headers

Field Description
X-API-Key Required Your API Key

Parameters

Field Type Description
url String Required Accepts: properly formatted fully qualified URL. Example: https://jsonrepo.com/blog
analyze Boolean Optional Get Google search data
Default: false
limit Integer Optional The number of maximum recommendations to be generated by our AI
Default: 10
Range: 1 <= limit <= 20

Understanding Endpoint Cost:

When keyword suggestions are returned to you, they are given without Google's search volume, cpc or competition data. The cost for the recommendations without the search data is 1 token/credit per request.

In order to get Google search information, you need to set analyze to true. This will change the pricing to 1 token/credit per keyword IF we don't have the keyword in our cache.

Example:

Say you want to get 12 recommendations for some URL. Simply fire a request to our servers with the url provided as a parameter. This will return a JSON array with 12 keywords and you'll be charged 1 token/credit in total.

If you want to also get the Google search data by setting analyze to true, the result from this endpoint will be piped into our Keyword Checker endpoint and you will be charged 1 token/credit per keyword.

However, Because AI output is non-deterministic, the endpoint may return a couple duplicate keywords between requests. In order for you to not get charged for those duplicates, we deduct from the total cost any keywords that exist in our cache. That way your maximum cost with analyze = true is:

(1 * 12) - number of cached keywords

While this may seem complicated, in reality, it is far cheaper than most other alternatives out there and it enables you to do research before requesting data for entries you might not like.

Limitations

WARNING: Scraping Protection

Please keep in mind that if you are using some bot protection service such as cloudflare or any other scraping prevention mechanism, the AI may be unable to access your website's content.

Similarly, dynamically generated javascript content is sometimes ignored by the AI scraper.

Response

A successful request will result in a populated payload field with the expected output.

Response Time:

AI output is bound by the efficiency of the model and the prompt enabling it. The bigger your limit is, the longer the request will take to process. Please be patient as processing the information could sometimes take between 1 and 10 seconds.

Example 1: No Analyze

Request Example
// Generate `3` keywords for the domain `https://snowball.club`

curl -X POST https://api.jsonrepo.com/v1/seo/ai_keyword_extractor \
-H "X-API-Key: {YOUR_API_KEY_HERE}" \
--data-urlencode "url=https://snowball.club/" \
--data-urlencode "limit=3"
// Server Response

{
    "http_code": 200,
    "http_message": "Ok",
    "timestamp": 1731741381,
    "message": "Successful execution.",
    "payload": {
        "keywords": {
            "input": {
                "url": "https://snowball.club/"
            },
            "output": [
                {
                    "origin": "generator",
                    "keyword": "monetize twitter audience",
                    "region": "global",
                    "length": 25,
                    "difficulty": "",
                    "volume": "",
                    "competition": "",
                    "cpc": ""
                },
                {
                    "origin": "generator",
                    "keyword": "twitter marketing",
                    "region": "global",
                    "length": 17,
                    "difficulty": "",
                    "volume": "",
                    "competition": "",
                    "cpc": ""
                },
                {
                    "origin": "generator",
                    "keyword": "twitter growth hacking",
                    "region": "global",
                    "length": 22,
                    "difficulty": "",
                    "volume": "",
                    "competition": "",
                    "cpc": ""
                }
            ]
        }
    }
}

Example 2: Analyze

Request Example
// Generate `3` keywords for the domain `https://snowball.club`
// Also grab Google search data

curl -X POST https://api.jsonrepo.com/v1/seo/ai_keyword_extractor \
-H "X-API-Key: {YOUR_API_KEY_HERE}" \
--data-urlencode "url=https://snowball.club/" \
--data-urlencode "limit=3" \
--data-urlencode "analyze=true"
// Server Response

{
    "http_code": 200,
    "http_message": "Ok",
    "timestamp": 1731741446,
    "message": "Successful execution.",
    "payload": {
        "keywords": {
            "input": {
                "url": "https://snowball.club/"
            },
            "output": [
                {
                    "origin": "remote",
                    "keyword": "tweet ideas",
                    "region": "global",
                    "length": 11,
                    "difficulty": 1,
                    "volume": 880,
                    "competition": 1,
                    "cpc": "0.00"
                },
                {
                    "origin": "remote",
                    "keyword": "grow twitter followers",
                    "region": "global",
                    "length": 22,
                    "difficulty": 3,
                    "volume": 320,
                    "competition": 60,
                    "cpc": "0.87"
                },
                {
                    "origin": "remote",
                    "keyword": "twitter audience",
                    "region": "global",
                    "length": 16,
                    "difficulty": 1,
                    "volume": 320,
                    "competition": 3,
                    "cpc": "1.16"
                }
            ]
        }
    }
}

Errors

A failed request will result in an error output as detailed in Error Rules. If the endpoint validation fails due to missing, badly formatted or invalid parameters, the endpoint will return HTTP code 400 along with a message detailing the error.

Error Response
// Request without `url` parameter

{
    "http_code": 400,
    "http_message": "Bad Request",
    "timestamp": 1730173006,
    "message": "'url' must be provided with proper formatting. Ex: https://jsonrepo.com/xyz",
    "payload": []
}
Invalid URL Response
// Request made for a website that's has anti-ai bot protection

{
    "http_code": 400,
    "http_message": "Bad Request",
    "timestamp": 1730172327,
    "message": "'url' provided returned an empty response.",
    "payload": []
}