AP News API endpoint
Returns AP News headlines from a public editorial hub. The service does not bypass authentication or access controls. Billing is 1 credit, or 5 credits when browser rendering is required.
/apnews/headlinesReturns public AP News headlines from one supported hub slug. Billing is 1 credit, or 5 credits when the page requires a browser render.
Query parameters: section is required and must be one of ap-top-news, us-news, world-news, politics, business, technology, science, health, sports, entertainment, or lifestyle. The standalone Fact Check page is available from apnews-fact-check.
| Field | Filled in, of 122 checked | Values in the sample |
|---|---|---|
| title | 122 | median 84 characters |
| url | 122 | apnews.com |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| section | string | Yes | AP News section slug Allowed values: ap-top-news, us-news, world-news, politics, business, technology, science, health, sports, entertainment, lifestyle. | ap-top-news | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/apnews/headlines?section=ap-top-news" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"data": {
"section": "world-news",
"items": [
{
"title": "Example AP headline",
"url": "https://apnews.com/article/example-article-id"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/publicnews.headlinesResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| data | newsplatform.HeadlinesResponse | No | ||||
| data.items | array | No | ||||
| data.items[].author | string | No | ||||
| data.items[].image_url | string | No | ||||
| data.items[].published_at | string | No | ||||
| data.items[].summary | string | No | ||||
| data.items[].title | string | No | ||||
| data.items[].type | string | No | ||||
| data.items[].url | string | No | ||||
| data.section | string | No |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/apnews/headlines?section=ap-top-news" \
-H "x-api-key: $CRAWLORA_API_KEY"