HuffPost API endpoint
Returns current HuffPost headlines for one topic hub. `section` is required and takes a slug that can include a path, such as `news/politics`, `impact/green`, `entertainment/tv`, `life/travel` or `voices/black-voices`. Each item has its title, URL and image. Summary, author and publication time are not returned.
/huffpost/headlinesQuery parameter: section is required and must be one of news, news/us-news, news/world-news, impact/business, impact/green, section/health, impact/topic/social-justice, news/crime, news/politics, news/topic/us-congress, news/topic/extremism, section/opinion, entertainment, entertainment/arts, news/media, entertainment/celebrity, entertainment/tv, section/sports, life, life/healthy-living, life/travel, life/technology, life/taste, life/style, life/family, life/relationships, life/money, life/huffpost-home, life/worklife, life/huffpost-shopping, voices, voices/black-voices, voices/queer-voices, voices/latino-voices, voices/indigenous-voices, voices/asian-voices, voices/womens-voices, voices/voices-of-disabled-people, section/huffpost-personal, section/video.
| Field | Filled in, of 10 checked | Values in the sample |
|---|---|---|
| title | 10 | median 79 characters |
| url | 10 | huffpost.com |
| image_url | 10 | img.huffingtonpost.com |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| section | string | Yes | HuffPost section slug Allowed values: news, news/us-news, news/world-news, impact/business, impact/green, section/health, impact/topic/social-justice, news/crime, news/politics, news/topic/us-congress, news/topic/extremism, section/opinion, entertainment, entertainment/arts, news/media, entertainment/celebrity, entertainment/tv, section/sports, life, life/healthy-living, life/travel, life/technology, life/taste, life/style, life/family, life/relationships, life/money, life/huffpost-home, life/worklife, life/huffpost-shopping, voices, voices/black-voices, voices/queer-voices, voices/latino-voices, voices/indigenous-voices, voices/asian-voices, voices/womens-voices, voices/voices-of-disabled-people, section/huffpost-personal, section/video. | news | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/huffpost/headlines?section=news" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"data": {
"section": "news/politics",
"items": [
{
"title": "Example headline",
"url": "https://www.huffpost.com/entry/example-story_n_1234567890abcdef12345678",
"image_url": "https://img.huffingtonpost.com/asset/example.jpeg"
}
]
}
}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 HuffPost 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/huffpost/headlines?section=news" \
-H "x-api-key: $CRAWLORA_API_KEY"