📊 Analytics APIs Documentation

APIs for fetching ranked data and AI-generated reports for cities, regions, and countries worldwide. Click on an API below to explore details, parameters, and response examples.

Analytics Data & Rank API GET

Endpoint: /api/analytics/rank-data

Description: Fetch ranked data for cities, regions, and countries based on different metrics.

Query Parameters:

Parameter Type Description
location_type string (required) "city", "region", or "country"
location string (required) Name of the location
date_range string (optional) "last7days", "last30days", or custom range

Example Response:

{
  "location": "Jaunpur",
  "ranked_data": [
    {"metric": "culture_score", "rank": 1},
    {"metric": "tourism_score", "rank": 3}
  ]
}
AI Report API GET

Endpoint: /api/analytics/ai-report

Description: Fetch AI-generated reports for cities, regions, or countries providing insights and trends.

Query Parameters:

Parameter Type Description
location_type string (required) "city", "region", or "country"
location string (required) Name of the location
date_range string (optional) "last7days", "last30days", or custom range

Example Response:

{
  "location": "Jaunpur",
  "ai_report": "The city shows a strong cultural presence with high tourism interest in historical monuments."
}