Skip to main content
Three endpoints manage the RSS news feed list. The GET endpoint is public; PUT and POST require X-Admin-Key.

Feed object schema

All feed objects share the same structure:
name
string
required
Display name for the feed (e.g. "BBC").
url
string
required
Full RSS/Atom feed URL.
weight
number
required
Priority weight from 1 (lowest) to 5 (highest). Higher-weight feeds contribute more to the clustered news layer.

GET /api/settings/news-feeds

Returns the current list of configured RSS news feeds. Public — no authentication required.
Rate limit: 30 requests per minute per IP.

Example

curl http://localhost:8000/api/settings/news-feeds
[
  { "name": "BBC", "url": "http://feeds.bbci.co.uk/news/world/rss.xml", "weight": 3 },
  { "name": "GDACS", "url": "https://www.gdacs.org/xml/rss.xml", "weight": 5 },
  { "name": "Defense News", "url": "https://www.defensenews.com/arc/outboundfeeds/rss/", "weight": 3 }
]

PUT /api/settings/news-feeds

Replaces the entire news feed list with the provided array. Requires X-Admin-Key.
Rate limit: 10 requests per minute per IP.

Validation rules

  • Maximum 20 feeds per list.
  • Each feed must have a non-empty name and url.
  • weight must be an integer between 1 and 5.

Headers

X-Admin-Key
string
required
Admin authentication key.

Request body

A JSON array of feed objects. Each object must include name, url, and weight.

Response

status
string
required
"updated" on success.
count
number
required
Number of feeds saved.

Example

curl -X PUT http://localhost:8000/api/settings/news-feeds \
  -H "X-Admin-Key: your-secret-key" \
  -H "Content-Type: application/json" \
  -d '[
    {"name": "BBC", "url": "http://feeds.bbci.co.uk/news/world/rss.xml", "weight": 3},
    {"name": "GDACS", "url": "https://www.gdacs.org/xml/rss.xml", "weight": 5}
  ]'
{
  "status": "updated",
  "count": 2
}

POST /api/settings/news-feeds/reset

Resets the news feed list to the built-in defaults (19 feeds including NPR, BBC, Al Jazeera, GDACS, Focus Taiwan, Defense News, and others). Requires X-Admin-Key.
Rate limit: 10 requests per minute per IP.

Headers

X-Admin-Key
string
required
Admin authentication key.

Response

status
string
required
"reset" on success, "error" on failure.
feeds
object[]
The restored default feed list. Present on success.

Example

curl -X POST http://localhost:8000/api/settings/news-feeds/reset \
  -H "X-Admin-Key: your-secret-key"
{
  "status": "reset",
  "feeds": [
    { "name": "NPR", "url": "https://feeds.npr.org/1004/rss.xml", "weight": 4 },
    { "name": "BBC", "url": "http://feeds.bbci.co.uk/news/world/rss.xml", "weight": 3 }
  ]
}

Build docs developers (and LLMs) love