Vocabulary API
The ZineCore2 vocabularies are published via HTTP API with content negotiation, supporting multiple standard formats (JSON, JSON-LD, SKOS/Turtle, CSV).
Base URL
https://zinecore.org/api/vocabularies/
Content Negotiation
Use HTTP Accept headers to request different formats:
| Format | Accept Header | Example |
|---|---|---|
| JSON | application/json | curl https://zinecore.org/api/vocabularies/subjects |
| JSON-LD | application/ld+json | curl -H "Accept: application/ld+json" https://zinecore.org/api/vocabularies/genres |
| SKOS/Turtle | text/turtle | curl -H "Accept: text/turtle" https://zinecore.org/api/vocabularies/subjects |
| CSV | text/csv | curl -H "Accept: text/csv" https://zinecore.org/api/vocabularies/rights_statements |
Alternatively, use the format query parameter:
GET /api/vocabularies/subjects?format=jsonld
GET /api/vocabularies/genres?format=turtle
GET /api/vocabularies/rights_statements?format=csv
API Endpoints
List All Vocabularies
GET /api/vocabularies
Returns an index of all available vocabularies with metadata.
Get Specific Vocabulary
GET /api/vocabularies/{vocab_id}
Available vocab_id values:
- subjects - Zine subject terms (~150-300 topical terms)
- genres - Zine genres (18+ format types)
- rights_statements - Rights and licensing terms
- agent_kinds - Agent types (Person, Collective, Organization)
- agent_roles - Contributor roles (Creator, Editor, Illustrator, etc.)
- repo_kinds - Repository types (Library, Archive, Distro, etc.)
- holding_access_statuses - Access levels (Reading room only, Loanable, etc.)
- holding_distro_statuses - Duplication permissions (Can duplicate, Can digitize, etc.)
Response Format
JSON (Default)
{
"id": "https://zinecore.org/vocab/subjects/",
"title": "Zine Subject Terms",
"description": "Controlled vocabulary for zine subject headings",
"namespace": "https://zinecore.org/vocab/subjects/",
"terms": [
{
"code": "activism",
"label": "Activism",
"definition": "Social and political activism",
"uri": "https://zinecore.org/vocab/subjects/activism"
},
...
]
}
JSON-LD
Includes full semantic web context with SKOS mappings:
{
"@context": {
"@vocab": "http://www.w3.org/2004/02/skos/core#",
"subjects": "https://zinecore.org/vocab/subjects/"
},
"@id": "https://zinecore.org/vocab/subjects/",
"@type": "ConceptScheme",
"prefLabel": "Zine Subject Terms",
"hasTopConcept": [
{
"@id": "subjects:activism",
"@type": "Concept",
"prefLabel": "Activism",
"definition": "Social and political activism"
},
...
]
}
SKOS/Turtle
W3C SKOS format for semantic web integration:
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix subjects: <https://zinecore.org/vocab/subjects/> .
<https://zinecore.org/vocab/subjects/> a skos:ConceptScheme ;
skos:prefLabel "Zine Subject Terms" ;
skos:hasTopConcept subjects:activism .
subjects:activism a skos:Concept ;
skos:prefLabel "Activism" ;
skos:definition "Social and political activism" .
CSV
Tabular format for spreadsheet imports:
code,label,definition,uri
activism,Activism,Social and political activism,https://zinecore.org/vocab/subjects/activism
anarchism,Anarchism,Anarchist politics and philosophy,https://zinecore.org/vocab/subjects/anarchism
...
Programming Examples
JavaScript / TypeScript
// Fetch subjects vocabulary as JSON
const subjects = await fetch('https://zinecore.org/api/vocabularies/subjects')
.then(r => r.json());
console.log(subjects.title); // "Zine Subject Terms"
subjects.terms.forEach(term => {
console.log(`${term.code}: ${term.label}`);
});
// Fetch as JSON-LD for semantic web
const genresLD = await fetch('https://zinecore.org/api/vocabularies/genres', {
headers: { 'Accept': 'application/ld+json' }
}).then(r => r.json());
// Fetch as CSV text
const csv = await fetch('https://zinecore.org/api/vocabularies/rights_statements', {
headers: { 'Accept': 'text/csv' }
}).then(r => r.text());
// Using query parameter
const turtle = await fetch('https://zinecore.org/api/vocabularies/subjects?format=turtle')
.then(r => r.text());
Python
import requests
# Fetch subjects as JSON
response = requests.get('https://zinecore.org/api/vocabularies/subjects')
subjects = response.json()
print(subjects['title']) # "Zine Subject Terms"
for term in subjects['terms']:
print(f"{term['code']}: {term['label']}")
# Fetch as JSON-LD
headers = {'Accept': 'application/ld+json'}
genres_ld = requests.get('https://zinecore.org/api/vocabularies/genres', headers=headers).json()
# Fetch as CSV
headers = {'Accept': 'text/csv'}
csv_data = requests.get('https://zinecore.org/api/vocabularies/rights_statements', headers=headers).text
# Using query parameter
turtle_data = requests.get('https://zinecore.org/api/vocabularies/subjects?format=turtle').text
cURL
# JSON (default)
curl https://zinecore.org/api/vocabularies/subjects
# JSON-LD
curl -H "Accept: application/ld+json" https://zinecore.org/api/vocabularies/genres
# SKOS/Turtle
curl -H "Accept: text/turtle" https://zinecore.org/api/vocabularies/subjects
# CSV
curl -H "Accept: text/csv" https://zinecore.org/api/vocabularies/rights_statements
# Using query parameter
curl "https://zinecore.org/api/vocabularies/subjects?format=turtle"
CORS Support
The API supports Cross-Origin Resource Sharing (CORS) for browser-based applications:
// Works from any domain
fetch('https://zinecore.org/api/vocabularies/subjects')
.then(r => r.json())
.then(data => console.log(data));
Rate Limiting
The API is currently unlimited for read-only access. For bulk downloads or high-frequency access, please consider:
- Caching responses locally to reduce requests
- Using static file downloads for offline use (see Downloads)
- Mirroring vocabularies via the vocabulary API GitHub repository
Stable URIs
Each vocabulary term has a stable, dereferenceable URI:
https://zinecore.org/vocab/subjects/activism
https://zinecore.org/vocab/genres/perzine
https://zinecore.org/vocab/rights/cc-by-4.0
These URIs follow linked data best practices and can be used in RDF graphs, JSON-LD contexts, and semantic web applications.
See Also
- Controlled Vocabularies Overview - Detailed term definitions
- Downloads - Static file downloads for offline use
- JSON-LD Playground - Test vocabulary contexts