Integrate WebCite into your tools. Archive pages programmatically.
curl -X POST https://your-server.com/api/archive \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/article"}'
Returns the archive ID and metadata. The full text is available at /api/archive/{id}
curl https://your-server.com/api/archive/ARCHIVE_ID \ -H "X-API-Key: YOUR_API_KEY"
import requests
API_KEY = "your_key_here"
BASE = "https://your-server.com"
# Archive a URL
resp = requests.post(f"{BASE}/api/archive",
json={"url": "https://example.com"},
headers={"X-API-Key": API_KEY})
data = resp.json()
print(f"Archived: {data['id']}")
# Retrieve the text
resp = requests.get(f"{BASE}/api/archive/{data['id']}",
headers={"X-API-Key": API_KEY})
text = resp.json()["text"]
print(text[:500])