An API providing information about famous Tanzanian personalities.
TanzaniaFamousAPI is a service that offers data on notable individuals from Tanzania. This documentation provides details on how to use the API, available endpoints, and example requests and responses.
To use the API, make GET requests to the provided endpoints to retrieve information about famous Tanzanians.
GET /api/famous
- Retrieve all famous personalitiesGET /api/famous/:id
- Get a specific famous personality by IDGET /api/v1/query
- Query famous personalities with various parameters
Example request:
GET https://tanzania-famous-api.netlify.app/api/famous/1
Example response:
{
"success": true,
"data": {
"id": 1,
"name": "Julius Nyerere",
"dob": "1922-04-13",
"description": "First President of Tanzania and African socialist leader."
}
}
Example request:
GET https://tanzania-famous-api.netlify.app/api/famous
The query endpoint supports various parameters for filtering and pagination.
Example requests:
-
Get all famous personalities:
-
Search by name:
GET https://tanzania-famous-api.netlify.app/api/v1/query?search=John
-
Filter by date of birth:
GET https://tanzania-famous-api.netlify.app/api/v1/query?dob=1990-01-01
-
Limit results:
GET https://tanzania-famous-api.netlify.app/api/v1/query?limit=10
-
Paginate results:
GET https://tanzania-famous-api.netlify.app/api/v1/query?page=1
-
Combine multiple parameters:
GET https://tanzania-famous-api.netlify.app/api/v1/query?search=John&dob=1990-01-01&limit=10&page=1
Example response structure:
{
"success": true,
"data": [
/* Array of famous personalities */
],
"total": 10,
"page": 1,
"limit": 10
}