API Documentation
The LatinX Roots DB website provides a simple JSON API to access information about historical Latin American and Caribbean figures. All data is available through HTTP GET requests with no authentication required.
Base URL
https://pretty-games.github.io/latinx-roots-db/
Get List of People
Returns an array of JSON filenames for all available people in the database.
GET /people/list.json
Response Example:
[
"aime-cesaire.json",
"anton-de-kom.json",
"augusto-cesar-sandino.json",
"benito-juarez.json",
"carlos-antonio-lopez.json",
"cheddi-jagan.json",
...
]
Get Person Details
Returns detailed information about a specific person using their filename from the list endpoint.
GET /people/{filename}
Parameters:
- filename - The JSON filename from the list endpoint (e.g., "anton-de-kom.json")
Response Example:
{
"schemaVersion": "1.0",
"preferredName": "Anton de Kom",
"image": "people/images/person-image-template.png",
"info": {
"fullname": "Cornelis Gerhard Anton de Kom",
"bornlocation": "Paramaribo, Suriname",
"birthdate": "1898-02-22",
"deathdate": "1945-04-24",
"origin": "Surinamese",
"tags": [
"resistance fighter",
"anti-colonial",
"author",
"activist"
]
},
"knownFor": [
"Anton de Kom was a Surinamese anti-colonial author..."
],
"impact": [
"Pioneered anti-colonial literature in Suriname..."
],
"sources": [
{
"description": "Wikipedia: Anton de Kom",
"url": "https://en.wikipedia.org/wiki/Anton_de_Kom"
}
]
}
Access Person Images
Person images are available through the image path specified in each person's JSON data.
GET /{image_path}
Example:
GET /people/images/person-image-template.png
The image path is found in the image field of each person's JSON response.
Usage Examples
JavaScript Example:
// Fetch list of all people
fetch('https://pretty-games.github.io/latinx-roots-db/people/list.json')
.then(response => response.json())
.then(peopleList => {
console.log('Available people:', peopleList);
// Fetch details for the first person
return fetch(`https://pretty-games.github.io/latinx-roots-db/people/${peopleList[0]}`);
})
.then(response => response.json())
.then(person => {
console.log('Person details:', person);
console.log('Image URL:', `https://pretty-games.github.io/latinx-roots-db/${person.image}`);
})
.catch(error => console.error('Error:', error));
Python Example:
import requests
# Fetch list of people
response = requests.get('https://pretty-games.github.io/latinx-roots-db/people/list.json')
people_list = response.json()
print(f"Found {len(people_list)} people")
# Fetch details for each person
for filename in people_list:
person_response = requests.get(f'https://pretty-games.github.io/latinx-roots-db/people/{filename}')
person = person_response.json()
print(f"Name: {person['preferredName']}")
print(f"Origin: {person['info']['origin']}")
print(f"Tags: {', '.join(person['info']['tags'])}")
print(f"Image: https://pretty-games.github.io/latinx-roots-db/{person['image']}")
print("---")
Data Schema
Each person JSON object contains the following fields:
- schemaVersion: Version of the data schema
- preferredName: The name most commonly used to refer to this person
- image: Relative path to the person's image
- info: Basic biographical information
- fullname: Complete legal name
- bornlocation: Place of birth
- birthdate: Date of birth (YYYY-MM-DD format)
- deathdate: Date of death (YYYY-MM-DD format, if applicable)
- origin: Country or region of origin
- tags: Array of descriptive tags
- knownFor: Array of descriptions about what this person is known for
- impact: Array of descriptions about their impact on society and Latino community
- sources: Array of source references with description and URL
Rate Limits & Usage
This API is hosted on GitHub Pages and has no explicit rate limits, but please be respectful and avoid excessive requests. The data is static and updated only when new people are added to the repository.
Contributing
This is an open-source project. To add new people or modify existing data, please visit our GitHub repository and submit a pull request.