Nation Africa API endpoint
Returns one Nation Africa author's public profile: name, bio, portrait and the latest stories the profile page itself lists (a handful; the site loads the full list separately and it is not read).
/nationafrica/authorQuery parameters:
slug (optional): an author slug, the name slug plus the numeric profile id, e.g. richard-munguti-11590. Take it from the author link on an article byline.url (optional): a canonical https://nation.africa/kenya/<author-slug> URL, as an alternative to slug.Exactly one of slug/url is required. The profile page itself lists only the writer's few most recent stories (typically four); the site loads the complete list separately, and that list is not read, so there is no pagination. Each listed story has title, url, a summary when shown, and premium: true for subscriber-only stories. bio and image_url are omitted when the author has none. Contact details on the page are not returned. An unknown author returns a not-found error.
Example response (truncated):
{"code":200,"data":{"name":"Richard Munguti","slug":"richard-munguti-11590","url":"https://nation.africa/kenya/richard-munguti-11590","bio":"Richard Munguti is a court reporter for the Daily Nation Newspaper. Before joining NMG, Richard worked for the Kenya Times for 22 years as a correspondent covering Parliament and the Judiciary.","image_url":"https://nation.africa/resource/image/11592/portrait_ratio1x1/1600/1600/ee707bb75642d083e785e640e16d7367/KH/munguti.jpg","articles":[{"title":"Man claiming to be George Saitoti’s son to pursue share of estate","url":"https://nation.africa/kenya/news/man-claiming-to-be-george-saitoti-s-son-pursue-share-of-estate--5607968"}]}}
| Field | Filled in, of 4 checked | Values in the sample |
|---|---|---|
| title | 4 | median 61 characters |
| url | 4 | nation.africa |
| summary | 1 | median 70 characters |
| premium | 2 | true in 2 of 2 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| slug | string | No | Author slug, e.g. richard-munguti-11590 | richard-munguti-11590 | |
| url | string | No | Canonical nation.africa/kenya/<author-slug> URL; alternative to slug | https://nation.africa/kenya/richard-munguti-11590 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/nationafrica/author" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"data": {
"name": "Richard Munguti",
"slug": "richard-munguti-11590",
"url": "https://nation.africa/kenya/richard-munguti-11590",
"bio": "Richard Munguti is a court reporter for the Daily Nation Newspaper. Before joining NMG, Richard worked for the Kenya Times for 22 years as a correspondent covering Parliament and the Judiciary.",
"image_url": "https://nation.africa/resource/image/11592/portrait_ratio1x1/1600/1600/ee707bb75642d083e785e640e16d7367/KH/munguti.jpg",
"articles": [
{
"title": "Man claiming to be George Saitoti’s son to pursue share of estate",
"url": "https://nation.africa/kenya/news/man-claiming-to-be-george-saitoti-s-son-pursue-share-of-estate--5607968"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/publicnews.nationAfricaAuthorResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| data | nationafrica.AuthorResponse | No | ||||
| data.articles | array | No | ||||
| data.articles[].premium | boolean | No | ||||
| data.articles[].summary | string | No | ||||
| data.articles[].title | string | No | ||||
| data.articles[].url | string | No | ||||
| data.bio | string | No | ||||
| data.image_url | string | No | ||||
| data.name | string | No | ||||
| data.slug | string | No | ||||
| data.url | string | No |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 404 | Not Found | #/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/nationafrica/author" \
-H "x-api-key: $CRAWLORA_API_KEY"