AP News API endpoint
Lists the 11 AP News hubs accepted by `apnews-headlines`: `ap-top-news`, `us-news`, `world-news`, `politics`, `business`, `technology`, `science`, `health`, `sports`, `entertainment` and `lifestyle`. Each has a `slug`, display `name` and hub `url`. The Fact Check page is served by `apnews-fact-check` instead.
/apnews/sectionsReturns the public AP News hub inventory accepted by apnews-headlines. Slugs are ap-top-news, us-news, world-news, politics, business, technology, science, health, sports, entertainment, and lifestyle. The standalone Fact Check page is available from apnews-fact-check.
| Field | Filled in, of 11 checked | Values in the sample |
|---|---|---|
| slug | 11 | |
| name | 11 | “Top News” and 10 other values |
| url | 11 | apnews.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/apnews/sections" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"data": {
"sections": [
{
"slug": "ap-top-news",
"name": "Top News",
"url": "https://apnews.com/hub/ap-top-news"
}
]
}
}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/apnews/sections" \
-H "x-api-key: $CRAWLORA_API_KEY"