The Straits Times API endpoint
Lists The Straits Times section slugs that the headlines endpoint accepts, including nested ones such as `singapore/politics`, `asia/east-asia`, `world/europe`, `life/food`, `business/invest`, `sport/tennis`, `tech` and `breaking-news`. Each entry has a `slug`, display `name` and `url`.
/straitstimes/sectionsReturns the public category/section slugs accepted by straitstimes-headlines: singapore, singapore/housing, singapore/health, singapore/transport, singapore/parenting-education, singapore/politics, singapore/jobs, singapore/environment, singapore/courts-crime, singapore/community, asia, asia/se-asia, asia/east-asia, asia/south-asia, asia/australianz, world, world/united-states, world/europe, world/middle-east, opinion, opinion/forum, life, life/entertainment, life/travel, life/food, life/home-design, life/style, life/arts, business, business/economy, business/banking, business/companies-markets, business/invest, sport, sport/basketball, sport/football, sport/formula-one, sport/golf, sport/schools, sport/tennis, sport/racing, tech, breaking-news.
| Field | Filled in, of 43 checked | Values in the sample |
|---|---|---|
| slug | 43 | |
| name | 43 | “Singapore” and 42 other values |
| url | 43 | straitstimes.com |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/straitstimes/sections" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"data": {
"sections": [
{
"slug": "singapore",
"name": "Singapore",
"url": "https://www.straitstimes.com/news/singapore/rss.xml"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/publicnews.sectionsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| data | newsplatform.SectionsResponse | No | ||||
| data.sections | array | No | ||||
| data.sections[].name | string | No | ||||
| data.sections[].slug | string | No | ||||
| data.sections[].url | string | No |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/straitstimes/sections" \
-H "x-api-key: $CRAWLORA_API_KEY"