API Documentation
Generate SEO meta tags programmatically with the TagGenius REST API.
Quick Start
1
Get your API key
On the homepage, enter your email, then click "API Keys" in the purple banner.
2
Make a request
Send a POST request with your content or URL to generate meta tags.
3
Use the response
Get back optimized title, description, keywords, and HTML code.
Base URL
https://taggenius.pro/api/v1Authentication
All API requests require a valid API key passed in the Authorization header.
Authorization: Bearer tg_live_your_api_key_here
Rate Limits
| Plan | Requests / Month |
|---|---|
| Free | 100 |
| Pro ($10/mo) | 10,000 |
Rate limits reset on the 1st of each month (UTC).
Endpoints
POST
/generateGenerate meta tags from content or a URL.
Request Body
{
"content": "Your page content here...", // OR
"url": "https://example.com/page", // Fetch content from URL
"keywords": ["optional", "target", "keywords"]
}Response
{
"success": true,
"data": {
"title": "Generated SEO Title - Brand Name",
"description": "Generated meta description optimized for search engines...",
"keywords": ["keyword1", "keyword2", "keyword3"],
"openGraph": {
"title": "OG Title",
"description": "OG Description",
"type": "website"
},
"twitter": {
"card": "summary_large_image",
"title": "Twitter Title",
"description": "Twitter Description"
},
"seoScore": 85,
"htmlCode": "<title>...</title>\n<meta name=\"description\"..."
},
"usage": {
"current": 42,
"limit": 10000,
"remaining": 9958
}
}Code Examples
cURL
curl -X POST https://taggenius.pro/api/v1/generate \
-H "Authorization: Bearer tg_live_your_key" \
-H "Content-Type: application/json" \
-d '{"content": "Your page content here..."}'JavaScript / Node.js
const response = await fetch('https://taggenius.pro/api/v1/generate', {
method: 'POST',
headers: {
'Authorization': 'Bearer tg_live_your_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
content: 'Your page content here...',
keywords: ['seo', 'meta tags'],
}),
});
const data = await response.json();
console.log(data.data.title);
console.log(data.data.description);Python
import requests
response = requests.post(
'https://taggenius.pro/api/v1/generate',
headers={
'Authorization': 'Bearer tg_live_your_key',
'Content-Type': 'application/json',
},
json={
'content': 'Your page content here...',
'keywords': ['seo', 'meta tags'],
}
)
data = response.json()
print(data['data']['title'])
print(data['data']['description'])PHP
$ch = curl_init('https://taggenius.pro/api/v1/generate');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer tg_live_your_key',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'content' => 'Your page content here...',
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo $data['data']['title'];Error Codes
| Code | Description |
|---|---|
400 | Bad request - missing or invalid parameters |
401 | Unauthorized - invalid or missing API key |
429 | Rate limit exceeded |
500 | Internal server error |
Ready to Get Started?
Follow these steps to generate your API key:
- 1Go to the TagGenius homepage
- 2Enter your email address in the generator form
- 3Click the "API Keys" button in the purple banner at the top
- 4Create a new key and copy it (it's only shown once!)