Teguh Arief Logo

Teguh Arief API Documentation

API Tester

Test the API directly from this page using POST requests:

Contact Teguh Arief to request an API key
Response
Status: - Time: -
// Response will appear here

Introduction

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

CMS Plugins Available

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

Mobile Apps Beta Released

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

Authentication is required for all API endpoints except public ones (health, endpoints). You can authenticate using one of the following methods:

Method 1: Bearer Token (Recommended)

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"
}

Method 2: Query Parameter

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"
}
How to Get an API Key

To request an API key, please contact Teguh Arief at https://www.teguharief.com/contact.

Code Examples

JavaScript (Axios) PHP (cURL) cURL
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"}'

Endpoints

POST /seo-check

Analyze SEO factors of a website

Request Body (JSON)

{
  "url": "https://example.com"
}

Example Request

POST /seo-check HTTP/1.1
Host: api.teguharief.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "url": "https://example.com"
}

POST /fetch-content

Fetch and parse content from a URL

Request Body (JSON)

{
  "url": "https://example.com"
}

POST /word-count

Count words and analyze character frequency

Request Body (JSON)

{
  "url": "https://example.com"
}

POST /website-crawler

Crawl a website and extract all links

Request Body (JSON)

{
  "url": "https://example.com"
}

POST /domain-check

Check domain availability

Request Body (JSON)

{
  "domain": "example.com"
}

POST /sitemap-generator

Generate XML sitemap for a website

Request Body (JSON)

{
  "url": "https://example.com",
  "maxPages": 100,
  "changefreq": "weekly",
  "priority": 0.8
}

POST /robots-generator

Generate robots.txt file for a website

Request Body (JSON)

{
  "url": "https://example.com",
  "userAgent": "*",
  "disallow": "/admin/,/wp-admin/",
  "allow": "/public/",
  "crawlDelay": 10,
  "sitemapUrl": "https://example.com/sitemap.xml"
}

GET /health

Check API health status (public endpoint, no API key required)

GET /endpoints

Get list of available endpoints (public endpoint, no API key required)