API Documentation

Programmatic access to website analysis

ℹ️ Authentication Optional

Anonymous users can use the API with 100 requests per day (IP-based rate limiting).

Create Account to get 2x rate limit and track usage.

Authentication (Optional)

API access works both with and without authentication. Authenticated users get 2x rate limits.

Anonymous Access (100 requests/day)

# No authentication needed
curl "https://locapeak.com/api/analyze?url=example.com"

Authenticated Access (200 requests/day)

Provide your API token using either method:

Option 1: Authorization Header (Recommended)
Authorization: Bearer YOUR_API_TOKEN
Option 2: X-API-Token Header
X-API-Token: YOUR_API_TOKEN

Get your token: Sign up at /signup and view your token on the Account page.

Endpoints

Website Analysis

GET /api/analyze?url={website_url}

Multi-Region Ping

POST /api/ping
Content-Type: application/json

{
  "target": "example.com",
  "count": 4
}

Multi-Region Traceroute

POST /api/traceroute
Content-Type: application/json

{
  "target": "example.com"
}
Parameters
Parameter Type Required Description
url string Yes The website URL to analyze (e.g., example.com or https://example.com)
Rate Limiting

Rate limits are based on your account's API multiplier:

Rate limit information is included in the response:

{
  "rate_limit": {
    "limit": 200,
    "remaining": 199,
    "window": "24 hours"
  }
}
Example Requests

cURL - Website Analysis

curl -H "Authorization: Bearer YOUR_API_TOKEN" \
  "https://locapeak.com/api/analyze?url=example.com"

cURL - Ping

curl -X POST \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"target": "example.com", "count": 4}' \
  "https://locapeak.com/api/ping"

Python - Website Analysis

import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN"
}

response = requests.get(
    "https://locapeak.com/api/analyze",
    params={"url": "example.com"},
    headers=headers
)
data = response.json()
print(data)

Python - Traceroute

import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}

response = requests.post(
    "https://locapeak.com/api/traceroute",
    json={"target": "example.com"},
    headers=headers
)
data = response.json()
print(data)

JavaScript

const headers = {
  "Authorization": "Bearer YOUR_API_TOKEN"
};

fetch('https://locapeak.com/api/analyze?url=example.com', { headers })
  .then(response => response.json())
  .then(data => console.log(data));
Response Structure
{
  "url": "https://example.com",
  "domain": "example.com",
  "dns": {
    "domain": "example.com",
    "a_record": "93.184.216.34",
    "ns_records": ["..."],
    "mx_records": ["..."],
    "txt_records": ["..."]
  },
  "ssl": {
    "issuer": {...},
    "subject": {...},
    "valid_from": "...",
    "valid_to": "...",
    "version": 3
  },
  "page": {
    "title": "Example Domain",
    "description": "Example description",
    "generator": null,
    "server": "nginx"
  },
  "social_links": {
    "Twitter": ["https://twitter.com/example"],
    "Facebook": ["https://facebook.com/example"]
  },
  "external_links": {
    "count": 10,
    "domains": ["..."]
  },
  "technologies": {
    "js_frameworks": ["React.js"],
    "css_frameworks": ["Bootstrap"],
    "analytics": ["Google Analytics"],
    "antibot": [],
    "marketing": [],
    "payment": []
  },
  "providers": {
    "registrar": "GoDaddy",
    "mail_provider": "Google Workspace"
  },
  "screenshot_url": "/screenshot/...",
  "rate_limit": {
    "limit": 5,
    "remaining": 4,
    "window": "24 hours"
  }
}
Error Responses

Rate Limit Exceeded (429)

{
  "error": "Rate limit exceeded",
  "requests_made": 5,
  "limit": 5,
  "window": "24 hours"
}

Server Error (500)

{
  "error": "Error analyzing website: ..."
}

Try the Web Interface