This API requires authentication for all endpoints except public ones (health, endpoints). To use this API, you need to:
Test the API directly from this page using POST requests:
// Response will appear here
Welcome to the Teguh Arief API documentation. This API provides various SEO tools including SEO Check, Outbound Links Checker, Word Count Analyzer, Website Crawler, Domain Availability Checker, XML Sitemap Generator, and Robots.txt Generator.
Base URL: https://api.teguharief.com
API Version: 1.0
We provide fully functional plugins for integrating our SEO tools with popular CMS platforms:
Browse all available plugins at: https://www.teguharief.com/cms-plugins
Access our SEO tools on your mobile device with our new mobile applications (Beta):
Note: These are beta releases. Some features may be limited. Visit our mobile apps page: https://www.teguharief.com/mobile-apps
Authentication is required for all API endpoints except public ones (health, endpoints). You can authenticate using one of the following methods:
Include your API key in the Authorization header:
POST /seo-check HTTP/1.1
Host: api.teguharief.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"url": "https://example.com"
}
Include your API key as a query parameter:
POST /seo-check?api_key=YOUR_API_KEY HTTP/1.1
Host: api.teguharief.com
Content-Type: application/json
{
"url": "https://example.com"
}
To request an API key, please contact Teguh Arief at https://www.teguharief.com/contact.
import axios from 'axios';
const API_BASE_URL = 'https://api.teguharief.com';
const API_KEY = 'YOUR_API_KEY';
const checkSeo = async (url) => {
try {
const response = await axios.post(`${API_BASE_URL}/seo-check`, { url }, {
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
}
});
console.log('SEO Check Success:', response.data);
return response.data;
} catch (error) {
if (error.response) {
console.error('API Error Response:', error.response.data);
console.error('Status:', error.response.status);
} else if (error.request) {
console.error('No response received:', error.request);
} else {
console.error('Error setting up request:', error.message);
}
throw error;
}
};
<?php
// SEO Check example using PHP cURL
function checkSeo($url) {
$apiKey = 'YOUR_API_KEY';
$apiUrl = 'https://api.teguharief.com/seo-check';
// Initialize cURL session
$ch = curl_init();
// Prepare request data
$data = json_encode(['url' => $url]);
// Set cURL options
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
'Content-Length: ' . strlen($data)
]);
// Execute cURL request
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
// Check for errors
if (curl_errno($ch)) {
echo 'Error: ' . curl_error($ch);
curl_close($ch);
return null;
}
// Close cURL session
curl_close($ch);
// Process response
if ($httpCode == 200) {
return json_decode($response, true);
} else {
echo 'Error: HTTP status code ' . $httpCode;
return null;
}
}
// Example usage
$result = checkSeo('https://example.com');
if ($result) {
echo "SEO Score: " . $result['seoScore']['value'] . "/100\n";
echo "Meta Title: " . $result['metaTitle']['text'] . "\n";
echo "Meta Description: " . $result['metaDescription']['text'] . "\n";
}
?>
curl -X POST 'https://api.teguharief.com/seo-check' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com"}'
Analyze SEO factors of a website
{
"url": "https://example.com"
}
POST /seo-check HTTP/1.1
Host: api.teguharief.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"url": "https://example.com"
}
Fetch and parse content from a URL
{
"url": "https://example.com"
}
Get outbound links from a website
{
"url": "https://example.com"
}
Count words and analyze character frequency
{
"url": "https://example.com"
}
Crawl a website and extract all links
{
"url": "https://example.com"
}
Check domain availability
{
"domain": "example.com"
}
Generate XML sitemap for a website
{
"url": "https://example.com",
"maxPages": 100,
"changefreq": "weekly",
"priority": 0.8
}
Generate robots.txt file for a website
{
"url": "https://example.com",
"userAgent": "*",
"disallow": "/admin/,/wp-admin/",
"allow": "/public/",
"crawlDelay": 10,
"sitemapUrl": "https://example.com/sitemap.xml"
}
Check API health status (public endpoint, no API key required)
Get list of available endpoints (public endpoint, no API key required)