The Telegraph API endpoint
Returns the current headlines for one The Telegraph section. `section` is required and takes one of `uk-news`, `world-news`, `politics`, `business`, `finance`, `technology`, `sport`, `culture`, `travel`, `lifestyle`, `health`, `science` or `opinion`. Each item has its title and URL.
/telegraph/headlinesQuery parameter: section is required and must be one of uk-news, world-news, politics, business, finance, technology, sport, culture, travel, lifestyle, health, science, opinion.
| Field | Filled in, of 20 checked | Values in the sample |
|---|---|---|
| title | 20 | median 61 characters |
| url | 20 | telegraph.co.uk |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| section | string | Yes | The Telegraph section slug Allowed values: uk-news, world-news, politics, business, finance, technology, sport, culture, travel, lifestyle, health, science, opinion. | uk-news | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/telegraph/headlines?section=uk-news" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"data": {
"section": "uk-news",
"items": [
{
"title": "Example headline",
"url": "https://www.telegraph.co.uk/world-news/example/"
}
]
}
}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 | HeadlineItem record, 7 fields: author, image_url, published_at, summary, title, type, url. Described under The Telegraph top stories API. | |||
| data.section | string | No |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/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/telegraph/headlines?section=uk-news" \
-H "x-api-key: $CRAWLORA_API_KEY"