πŸ“š API Documentation

Access comprehensive lighthouse performance data through our RESTful JSON API. All endpoints are publicly accessible and return structured data.

Quick Navigation:

πŸ” Overview & Authentication

API Base URL

https://cheetahcheck.com/api/

πŸ“ˆ Rate Limits & Usage

No authentication required - All endpoints are publicly accessible

Rate Limit: Generous limits for fair usage (GitHub Pages hosting)

Data Updates: Data is refreshed during each lighthouse testing cycle

🌐 CORS & Access

CORS Enabled: API can be accessed from any domain

Content-Type: application/json

HTTP Methods: GET only (static JSON files)

🌍 Global Data Endpoints

Global Overview

GET
api/overview.json

Comprehensive overview with global statistics, top performers, and metadata.

{
  "meta": {
    "generated_at": "2025-10-23T10:30:00.000Z",
    "api_version": "1.0",
    "total_websites": 435,
    "countries_count": 5,
    "industries_count": 5
  },
  "global_averages": {
    "performance": 85,
    "accessibility": 92,
    "best_practices": 88,
    "seo": 90,
    "pwa": 45
  },
  "top_performers": {
    "performance": [...],
    "accessibility": [...]
  }
}

All Countries

GET
api/countries.json

List of all countries with summary statistics and API endpoints.

{
  "meta": {
    "generated_at": "2025-10-23T10:30:00.000Z",
    "total_countries": 5
  },
  "countries": [
    {
      "country": "United States",
      "website_count": 45,
      "averages": { "performance": 85, "accessibility": 92 },
      "flag": "πŸ‡ΊπŸ‡Έ",
      "api_endpoint": "countries/united-states.json"
    }
  ]
}

All Industries

GET
api/industries.json

List of all industries with summary statistics and API endpoints.

{
  "meta": {
    "generated_at": "2025-10-23T10:30:00.000Z",
    "total_industries": 5
  },
  "industries": [
    {
      "industry": "Technology",
      "website_count": 28,
      "averages": { "performance": 88, "accessibility": 94 },
      "api_endpoint": "industries/technology.json"
    }
  ]
}

All Websites

GET
api/websites.json

Complete list of all monitored websites with latest scores.

{
  "meta": {
    "generated_at": "2025-10-23T10:30:00.000Z",
    "total_websites": 435
  },
  "websites": [
    {
      "url": "google.com",
      "country": "United States",
      "industry": "Search Engine",
      "scores": {
        "performance": 95,
        "accessibility": 98,
        "best_practices": 92,
        "seo": 100,
        "pwa": 85
      },
      "test_date": "2025-10-23T09:15:00.000Z",
      "api_endpoint": "websites/google-com.json"
    }
  ]
}

🏳️ Country-Specific Endpoints

Country Data

GET
api/countries/{country-slug}.json

Detailed data for a specific country including all websites and industry breakdown.

Available Countries

Country Endpoint Flag
Australia api/countries/australia.json πŸ‡¦πŸ‡Ί
Austria api/countries/austria.json πŸ‡¦πŸ‡Ή
Bangladesh api/countries/bangladesh.json 🌍
Belgium api/countries/belgium.json πŸ‡§πŸ‡ͺ
Bolivia api/countries/bolivia.json πŸ‡§πŸ‡΄
...and 0 more
{
  "meta": {
    "generated_at": "2025-10-23T10:30:00.000Z",
    "country": "United States",
    "flag": "πŸ‡ΊπŸ‡Έ",
    "website_count": 45
  },
  "averages": {
    "performance": 85,
    "accessibility": 92,
    "best_practices": 88,
    "seo": 90,
    "pwa": 45
  },
  "websites": [...],
  "industries": [...]
}

🏭 Industry-Specific Endpoints

Industry Data

GET
api/industries/{industry-slug}.json

Detailed data for a specific industry including all websites and country breakdown.

Sample Industries

Industry Endpoint
Media api/industries/media.json
Government api/industries/government.json
Real Estate api/industries/real-estate.json
Jobs api/industries/jobs.json
Marketplace api/industries/marketplace.json
...and more industries
{
  "meta": {
    "generated_at": "2025-10-23T10:30:00.000Z",
    "industry": "Technology",
    "website_count": 28
  },
  "averages": {
    "performance": 88,
    "accessibility": 94,
    "best_practices": 91,
    "seo": 92,
    "pwa": 52
  },
  "websites": [...],
  "countries": [...]
}

🌐 Website-Specific Endpoints

Website Data

GET
api/websites/{website-slug}.json

Detailed data for a specific website including historical scores and trends.

Sample Websites

Website Endpoint Country
9news.com.au api/websites/9newscomau.json Australia
abc.net.au api/websites/abcnetau.json Australia
australia.gov.au api/websites/australiagovau.json Australia
domain.com.au api/websites/domaincomau.json Australia
my.gov.au api/websites/mygovau.json Australia
...and 430 more websites
{
  "meta": {
    "generated_at": "2025-10-23T10:30:00.000Z",
    "url": "google.com",
    "country": "United States",
    "industry": "Search Engine"
  },
  "latest_scores": {
    "performance": 95,
    "accessibility": 98,
    "best_practices": 92,
    "seo": 100,
    "pwa": 85,
    "test_date": "2025-10-23T09:15:00.000Z"
  },
  "historical_data": [...],
  "trends": {
    "performance": +2,
    "accessibility": 0,
    "best_practices": -1,
    "seo": +1,
    "pwa": +3
  }
}

πŸ“Š Statistics & Analytics

Global Statistics

GET
api/stats.json

Comprehensive statistics including score distributions and breakdowns by country/industry.

{
  "meta": {
    "generated_at": "2025-10-23T10:30:00.000Z",
    "total_websites": 435
  },
  "distribution": {
    "performance": {
      "excellent": 120,
      "good": 85,
      "average": 45,
      "poor": 15
    }
  },
  "by_country": [...],
  "by_industry": [...]
}

Latest Updates

GET
api/latest-updates.json

Most recent scan results and summary statistics.

Trends Data

GET
api/trends.json

Performance trends showing changes between current and previous scores.

πŸ’» Code Examples

JavaScript (Fetch API)

// Get overview data
async function getOverview() {
    const response = await fetch('https://cheetahcheck.com/api/overview.json');
    const data = await response.json();
    console.log('Global averages:', data.global_averages);
}

// Get country-specific data
async function getCountryData(country) {
    const slug = country.toLowerCase().replace(/\s+/g, '-');
    const response = await fetch(`https://cheetahcheck.com/api/countries/${slug}.json`);
    const data = await response.json();
    return data;
}

// Get website performance history
async function getWebsiteHistory(website) {
    const slug = website.replace(/\./g, '-');
    const response = await fetch(`https://cheetahcheck.com/api/websites/${slug}.json`);
    const data = await response.json();
    return data.historical_data;
}

Python (requests)

import requests

# Get overview data
def get_overview():
    url = 'https://cheetahcheck.com/api/overview.json'
    response = requests.get(url)
    data = response.json()
    return data['global_averages']

# Get industry data
def get_industry_data(industry):
    slug = industry.lower().replace(' ', '-')
    url = f'https://cheetahcheck.com/api/industries/{slug}.json'
    response = requests.get(url)
    return response.json()

# Get all countries
def get_all_countries():
    url = 'https://cheetahcheck.com/api/countries.json'
    response = requests.get(url)
    data = response.json()
    return data['countries']

cURL

# Get overview
curl "https://cheetahcheck.com/api/overview.json"

# Get specific country data
curl "https://cheetahcheck.com/api/countries/united-states.json"

# Get website data with pretty printing
curl -s "https://cheetahcheck.com/api/websites/google-com.json" | jq '.'

Response Codes & Error Handling

HTTP Status Codes

Code Status Description
200 OK Successful request, data returned
404 Not Found Endpoint or resource not found
429 Too Many Requests Rate limit exceeded (rare)
500 Server Error GitHub Pages hosting issue

🀝 Support & Contributing

This API is part of the open-source CheetahCheck project. For issues, feature requests, or contributions: