ForeignPolicy API endpoint
Returns one Foreign Policy contributor's public profile: name, bio, and their recent articles. Further articles load behind a client-side control this endpoint does not follow, so this is the author page's initial recent-article list, not the contributor's full history.
/foreignpolicy/authorQuery parameters:
slug (optional): an author slug, e.g. anne-applebaum.url (optional): a canonical https://foreignpolicy.com/author/<slug>/ URL, as an alternative to slug.Exactly one of slug/url is required.
articles is the author page's initial recent-article list, not the contributor's complete publication history. Each article's section/section_url reflect Foreign Policy's own department taxonomy (Feature, Argument, In Other Words, and so on); published_at is YYYY-MM-DD.
Example response (truncated):
{"code":200,"data":{"name":"Anne Applebaum","slug":"anne-applebaum","url":"https://foreignpolicy.com/author/anne-applebaum/","bio":"Anne Applebaum, author of the Pulitzer Prize-winning book Gulag: A History, is the director of political studies at the Legatum Institute...","articles":[{"title":"Does Europe Even Matter?","url":"https://foreignpolicy.com/2015/12/01/does-europe-even-matter/","section":"Feature","section_url":"https://foreignpolicy.com/category/feature/","published_at":"2015-12-01"}]}}
| Field | Filled in, of 6 checked | Values in the sample |
|---|---|---|
| title | 6 | |
| url | 6 | foreignpolicy.com |
| section | 6 | |
| section_url | 6 | foreignpolicy.com |
| published_at | 6 | 2009-10-22 to 2015-12-01 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| slug | string | No | Author slug, e.g. anne-applebaum | anne-applebaum | |
| url | string | No | Canonical foreignpolicy.com/author/<slug>/ URL; alternative to slug | https://foreignpolicy.com/author/anne-applebaum/ | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/foreignpolicy/author" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"data": {
"name": "Anne Applebaum",
"slug": "anne-applebaum",
"url": "https://foreignpolicy.com/author/anne-applebaum/",
"bio": "Anne Applebaum, author of the Pulitzer Prize-winning book Gulag: A History, is the director of political studies at the Legatum Institute...",
"articles": [
{
"title": "Does Europe Even Matter?",
"url": "https://foreignpolicy.com/2015/12/01/does-europe-even-matter/",
"section": "Feature",
"section_url": "https://foreignpolicy.com/category/feature/",
"published_at": "2015-12-01"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/foreignpolicy.authorResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | foreignpolicy.AuthorResponse | No | ||||
| data.articles | array | No | ||||
| data.articles[].published_at | string | No | ||||
| data.articles[].section | string | No | ||||
| data.articles[].section_url | 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 | ||||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 404 | Not Found | #/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/foreignpolicy/author" \
-H "x-api-key: $CRAWLORA_API_KEY"