Generate SEO Meta Keywords & Descriptions API Documentation
Why Use This API?
This API helps blogs and e-commerce sites create optimized meta keywords and descriptions for better SEO performance. High-quality meta descriptions and keywords can boost search rankings, improve click-through rates (CTR), and increase visibility for target audiences. These improvements lead to higher user engagement and conversion rates, especially for e-commerce.
Technical Details
The API is located at https://clusterify.ai/api/generate-meta
and accepts a POST request.
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
keyword | string | Yes | The primary keyword for optimizing the meta tags (10-50 characters). |
subject | string | Yes | A brief description of the subject (5-50 characters). |
Response
The API returns a JSON array with SEO-optimized meta keywords and descriptions, sorted by SEO score (highest to lowest). It's recommended to programmatically pick the first item, which has the best SEO score.
[
{
"keyword": "example keyword 1",
"description": "example description 1",
"evaluation": {
"score": 10,
"explanation": "Explanation why it's a good meta keyword for SEO."
}
},
{
"keyword": "example keyword 2",
"description": "example description 2",
"evaluation": {
"score": 9,
"explanation": "Explanation why it's a good meta keyword for SEO."
}
},
// Three more entries...
]
Authentication
You need a JWT token to authenticate. Use the login API to get your token. Here’s an example with CURL:
curl -X POST https://clusterify.ai/api/login \
-H "Content-Type: application/json" \
-d '{"public_key": "your_public_key", "secret_key": "your_secret_key"}'
This call returns a JWT token to use for authentication in the API request.
Example API Call Using CURL
curl -X POST https://clusterify.ai/api/generate-meta \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_token" \
-d '{
"keyword": "organic cotton shirts",
"subject": "a stylish, eco-friendly cotton shirt"
}'
Example API Call Using Python
import requests
url = "https://clusterify.ai/api/generate-meta"
headers = {
"Authorization": "Bearer your_token",
"Content-Type": "application/json"
}
data = {
"keyword": "organic cotton shirts",
"subject": "a stylish, eco-friendly cotton shirt"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
Example API Call Using Next.js (Fetch)
async function generateMetaTags() {
const res = await fetch('https://clusterify.ai/api/generate-meta', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_token',
},
body: JSON.stringify({
keyword: 'organic cotton shirts',
subject: 'a stylish, eco-friendly cotton shirt'
}),
});
const data = await res.json();
console.log(data);
}
Example API Call Using PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://clusterify.ai/api/generate-meta");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Authorization: Bearer your_token",
"Content-Type: application/json"
));
$data = json_encode([
"keyword" => "organic cotton shirts",
"subject" => "a stylish, eco-friendly cotton shirt"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>