API Documentation
RESTful API for converting Zenodo records to EDM XML format
Base URL
http://anylod.modavis.org/v1
All API endpoints are prefixed with /v1 to indicate the API version.
Rate Limiting
The API is rate-limited to 30 requests per minute to ensure fair usage. When the limit is exceeded, a 429 response is returned.
| Header | Description |
|---|---|
X-RateLimit-Limit |
Maximum requests per time window |
X-RateLimit-Remaining |
Remaining requests in current window |
Retry-After |
Seconds to wait before retrying (on 429) |
Endpoints
GET
/v1/
Returns API information and available endpoints.
Response
{
"status": "success",
"data": {
"name": "AnyLOD Public API",
"version": "v1",
"description": "Convert Zenodo records to EDM XML format",
"rate_limit": "30 requests per minute"
}
}
GET
/v1/convert
Convert a Zenodo record to EDM XML via query parameters.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes* | Zenodo record ID (e.g., 1234567) |
url |
string | Yes* | Zenodo record URL |
format |
string | No | json (default) or xml |
* Either id or url must be provided.
Example
GET /v1/convert?id=10297036&format=json
POST
/v1/convert
Convert a Zenodo record to EDM XML via JSON body.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
identifier |
string | Yes | Zenodo record ID or URL |
format |
string | No | json (default) or xml |
selected_files |
array | No | List of file keys to include |
primary_file |
string | No | File key for edm:isShownBy |
Example Request
curl -X POST http://anylod.modavis.org/v1/convert \
-H "Content-Type: application/json" \
-d '{"identifier": "10297036", "format": "json"}'
Example Response
{
"status": "success",
"data": {
"record_id": "10297036",
"title": "Record Title",
"filename": "zenodo_10297036_Record_Title.xml",
"xml": "<?xml version='1.0' ...?><rdf:RDF...>",
"generated_at": "2026-01-08T15:30:00.000000"
}
}
POST
/v1/validate
Validate EDM XML against the official Europeana XSD schema.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
xml |
string | Yes | EDM XML string to validate |
Example Response
{
"status": "success",
"data": {
"valid": true,
"schema_validation": true,
"errors": [],
"warnings": ["Optional field xyz missing"],
"elements": {
"ProvidedCHO": 1,
"WebResource": 3,
"Aggregation": 1
}
}
}
Error Responses
All errors follow a consistent format:
{
"status": "error",
"message": "Description of what went wrong",
"error_code": 400
}
| Code | Description |
|---|---|
400 |
Bad request (invalid parameters or body) |
404 |
Zenodo record not found |
429 |
Rate limit exceeded |
500 |
Internal server error |
Health Check
GET
/api/health
Returns application health status. Used for container orchestration.
Response
{
"status": "success",
"data": {
"status": "healthy",
"version": "0.1.0-alpha.1",
"timestamp": "2026-01-08T15:30:00.000000"
}
}