ForeignAffairs API endpoint
Returns one Foreign Affairs contributor's public profile: name, bio, and the recent articles listed on their contributor page. Foreign Affairs does not paginate this page; it shows a fixed recent-article list.
/foreignaffairs/authorQuery parameters:
slug (optional): an author slug, e.g. robert-kagan.url (optional): a canonical https://www.foreignaffairs.com/authors/<slug> URL, as an alternative to slug.Exactly one of slug/url is required.
Foreign Affairs does not paginate this page -- it shows a fixed recent-article list (typically under ten items), not a page-by-page archive. Each article's issue_label/issue_url identify the print issue the piece ran in (for example Jan/Feb 2023); the page carries no per-article publication date. dek is the short subtitle Foreign Affairs shows under some article titles and is absent for others -- this is normal, not an error.
Example response (truncated):
{"code":200,"data":{"name":"Robert Kagan","slug":"robert-kagan","url":"https://www.foreignaffairs.com/authors/robert-kagan","bio":"ROBERT KAGAN is Stephen and Barbara Friedman Senior Fellow at the Brookings Institution and a contributing columnist for The Washington Post...","articles":[{"title":"A Free World, If You Can Keep It","url":"https://www.foreignaffairs.com/united-states/robert-kagan-free-world-if-you-can-keep-it-ukraine-america","dek":"Ukraine and American Interests","issue_label":"Jan/Feb 2023","issue_url":"https://www.foreignaffairs.com/issues/2023/102/1"}]}}
| Field | Filled in, of 9 checked | Values in the sample |
|---|---|---|
| title | 9 | |
| url | 9 | foreignaffairs.com |
| dek | 6 | |
| issue_label | 8 | |
| issue_url | 8 | foreignaffairs.com |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| slug | string | No | Author slug, e.g. robert-kagan | robert-kagan | |
| url | string | No | Canonical foreignaffairs.com/authors/<slug> URL; alternative to slug | https://www.foreignaffairs.com/authors/robert-kagan | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/foreignaffairs/author" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"data": {
"name": "Robert Kagan",
"slug": "robert-kagan",
"url": "https://www.foreignaffairs.com/authors/robert-kagan",
"bio": "ROBERT KAGAN is Stephen and Barbara Friedman Senior Fellow at the Brookings Institution and a contributing columnist for The Washington Post...",
"articles": [
{
"title": "A Free World, If You Can Keep It",
"url": "https://www.foreignaffairs.com/united-states/robert-kagan-free-world-if-you-can-keep-it-ukraine-america",
"dek": "Ukraine and American Interests",
"issue_label": "Jan/Feb 2023",
"issue_url": "https://www.foreignaffairs.com/issues/2023/102/1"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/foreignaffairs.authorResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | foreignaffairs.AuthorResponse | No | ||||
| data.articles | array | No | ||||
| data.articles[].dek | string | No | ||||
| data.articles[].issue_label | string | No | ||||
| data.articles[].issue_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/foreignaffairs/author" \
-H "x-api-key: $CRAWLORA_API_KEY"