📘 Content APIs Documentation
APIs for fetching posts, tags, city analytics, and city Upmana outputs. Click an API below to view usage, parameters, and examples.
Endpoint: /api/content/daily-post
Description: Fetch posts by date, tags, and emotion color.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
date |
string (optional) | YYYY-MM-DD format |
tags |
string (optional) | Comma-separated tags |
emotion |
string (optional) | Emotion color code |
Example Response:
{
"date": "2025-09-01",
"posts": [
{
"id": 1,
"title": "Post Title",
"tags": ["culture", "history"],
"emotion": "#FF5733",
"content": "This is the post content"
}
]
}
Endpoint: /api/content/tags
Description: Fetch all available tags used in posts.
Example Response:
{
"tags": ["culture", "history", "nature", "festival"]
}
Endpoint: /api/content/city-analytics
Description: Get analytics data for cities including post counts, trending tags, and emotion distribution.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
city |
string (required) | Name of the city |
date_range |
string (optional) | "last7days", "last30days", or custom range |
Example Response:
{
"city": "Jaunpur",
"analytics": {
"total_posts": 120,
"top_tags": ["culture", "festival"],
"emotion_distribution": {
"#FF5733": 40,
"#33FF57": 30,
"#3357FF": 50
}
}
}
Endpoint: /api/content/city-upmana
Description: Fetch Upmana knowledge output for a specific city.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
city |
string (required) | Name of the city |
Example Response:
{
"city": "Jaunpur",
"upmana": "Jaunpur is known for its historical Shahi Fort and cultural heritage."
}