National Post API endpoint
Returns one National Post author's public profile: name, bio when the author has one, the total number of stories the page attributes to them, and their latest stories (first page).
/nationalpost/authorQuery parameters:
slug (optional): an author slug, e.g. stuckpostmedia-com. Slugs are derived from the writer's Postmedia login, so they are not always the name; take the slug from the author link on an article byline.url (optional): a canonical https://nationalpost.com/author/<slug>/ URL, as an alternative to slug.Exactly one of slug/url is required. The response lists the first page of latest stories shown on the profile (up to 10; no further pagination), each with title, url, and, when the card shows them, a summary and the story's category. article_count is omitted when the page does not publish a total; when present, it can exceed the listed stories. Shared bylines such as specialnp ("Special to National Post") may report very large counts. Stories from other Postmedia sites and paid Sponsored stories are not listed. Contact details on the page are not returned. An unknown author returns a not-found error.
Example response (truncated):
{"code":200,"data":{"name":"Leigh Taveroff","slug":"leightaveroff","url":"https://nationalpost.com/author/leightaveroff/","bio":"Leigh is a writer, editor, thumb-war champ and shopping enthusiast hailing from Squamish, B.C. She tests the latest products and services to help readers make important purchasing decisions.","article_count":5,"articles":[{"title":"Swimming with Galápagos penguins made my wildlife dreams come true","url":"https://nationalpost.com/travel/swimming-with-penguins-galapagos-islands","category":"Travel International"}]}}
| Field | Filled in, of 10 checked | Values in the sample |
|---|---|---|
| title | 10 | median 82 characters |
| url | 10 | nationalpost.com |
| summary | 10 | median 100 characters |
| category | 10 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| slug | string | No | Author slug, e.g. stuckpostmedia-com | stuckpostmedia-com | |
| url | string | No | Canonical nationalpost.com/author/<slug>/ URL; alternative to slug | https://nationalpost.com/author/stuckpostmedia-com/ | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/nationalpost/author" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"data": {
"name": "Leigh Taveroff",
"slug": "leightaveroff",
"url": "https://nationalpost.com/author/leightaveroff/",
"bio": "Leigh is a writer, editor, thumb-war champ and shopping enthusiast hailing from Squamish, B.C. She tests the latest products and services to help readers make important purchasing decisions.",
"article_count": 5,
"articles": [
{
"title": "Swimming with Galápagos penguins made my wildlife dreams come true",
"url": "https://nationalpost.com/travel/swimming-with-penguins-galapagos-islands",
"category": "Travel International"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/publicnews.nationalPostAuthorResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| data | nationalpost.AuthorResponse | No | ||||
| data.article_count | integer | No | ||||
| data.articles | array | No | ||||
| data.articles[].category | string | No | ||||
| data.articles[].summary | string | No | ||||
| data.articles[].title | string | No | ||||
| data.articles[].url | string | No | ||||
| data.bio | 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/nationalpost/author" \
-H "x-api-key: $CRAWLORA_API_KEY"