ForeignPolicy API endpoint
Returns one page of Foreign Policy's live public project directory. Follow next_page until it is zero to enumerate the current project slug space, then pass a slug to foreignpolicy-project.
/foreignpolicy/projectsQuery parameter: page (optional), a 1-based directory page from 1 to 100; defaults to 1.
Returns the live public project cards on one Foreign Policy directory page. The slug space is open-ended and paginated. Follow next_page while it is nonzero, then pass a returned slug to foreignpolicy-project.
| Field | Filled in, of 12 checked | Values in the sample |
|---|---|---|
| slug | 12 | |
| name | 12 | “The End of the World as We Know It” and 11 other values |
| url | 12 | foreignpolicy.com |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| page | integer | No | 1 | 1-based project-directory page, defaults to 1 Minimum: 1. Maximum: 100. | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/foreignpolicy/projects?page=1" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"data": {
"page": 1,
"items": [
{
"slug": "asia",
"name": "Asia & the Pacific",
"url": "https://foreignpolicy.com/projects/asia/"
}
],
"next_page": 2
},
"msg": "OK"
}Request schema
No body schema
Response schema
#/definitions/foreignpolicy.projectsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | foreignpolicy.ProjectsResponse | No | ||||
| data.items | array | No | ||||
| data.items[].name | string | No | ||||
| data.items[].slug | string | No | ||||
| data.items[].url | string | No | ||||
| data.next_page | integer | No | ||||
| data.page | integer | No | ||||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/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/projects?page=1" \
-H "x-api-key: $CRAWLORA_API_KEY"