GET /v1/changes
Get pages that have been updated since a given timestamp. Useful for syncing content or monitoring updates.
GET https://api.wikirest.com/v1/changes
Try it in Playground
Parameters
| Parameter | Type | Required | Description |
since | string|integer | Optional | Unix timestamp (seconds) or RFC3339 datetime |
limit | integer | Optional | Results to return (1-1,000, default: 100) |
offset | integer | Optional | Pagination offset (default: 0) |
The since parameter accepts two formats:
- Unix timestamp:
since=1705315800 - RFC3339 datetime:
since=2024-01-15T10:30:00Z
Response
{
"results": [
{
"id": "736",
"page_id": 736,
"rev_id": 1234567890,
"title": "Albert Einstein",
"url": "https://en.wikipedia.org/wiki/Albert_Einstein",
"timestamp": "2024-01-15T10:30:00Z",
"ts_unix": 1705315800,
"source": {...},
"license": {...}
}
],
"offset": 0,
"limit": 100,
"total": 1543,
"attribution": {...}
}
Response Fields
| Field | Type | Description |
results | array | Array of changed page objects |
results[].page_id | integer | Wikipedia page ID |
results[].title | string | Article title |
results[].timestamp | string | Last modification (ISO 8601) |
results[].ts_unix | integer | Last modification (Unix timestamp) |
offset | integer | Current pagination offset |
limit | integer | Current page size |
total | integer | Total matching pages |
Use Cases
- Content sync: Keep a local cache up-to-date with Wikipedia changes
- Monitoring: Track updates to specific topics
- Webhooks: Poll periodically to detect new content
Examples
Get pages changed in last 24 hours (Unix timestamp)
curl -H "X-API-Key: YOUR_KEY" \
"https://api.wikirest.com/v1/changes?since=1705229400"
Get pages changed since a specific date (RFC3339)
curl -H "X-API-Key: YOUR_KEY" \
"https://api.wikirest.com/v1/changes?since=2024-01-14T10:30:00Z"
Paginate through results
curl -H "X-API-Key: YOUR_KEY" \
"https://api.wikirest.com/v1/changes?since=1705229400&limit=100&offset=100"
Error Responses
| Status | Error | Description |
400 | since must be unix seconds or RFC3339 | Invalid since parameter format |
401 | unauthorized | API key not provided |
429 | rate_limit_exceeded | Too many requests |