Introduction

Welcome to the Dinosaur Encyclopedia API! This RESTful API provides programmatic access to our comprehensive dinosaur database.

Base URL: https://dino.nbultra.site//api/v1/

Features

  • Access detailed information about 25+ dinosaur species
  • Search and filter dinosaurs by various criteria
  • Get geological period information
  • Retrieve images, videos, and audio data
  • Multi-language support (EN, ES, VI, ET)

Authentication

Currently, the API is open and does not require authentication. However, we recommend including your application name in the User-Agent header:

User-Agent: YourAppName/1.0
Note: API keys may be required in future versions for higher rate limits.

Endpoints

GET /dinosaurs

Retrieve a list of all dinosaurs.

Query Parameters:
Parameter Type Description
period string Filter by geological period (triassic, jurassic, cretaceous)
diet string Filter by diet type (carnivore, herbivore, omnivore)
lang string Language code (en, es, vi, et)
limit integer Number of results (default: 25, max: 100)
Example Response:
{
  "status": "success",
  "data": [
    {
      "id": 1,
      "name": "Tyrannosaurus Rex",
      "scientific_name": "Tyrannosaurus rex",
      "period": "cretaceous",
      "diet": "carnivore",
      "length": "12-13 meters",
      "weight": "8-14 tons",
      "description": "One of the largest carnivorous dinosaurs...",
      "image_url": "https://dino.nbultra.site//assets/images/dinosaurs/t-rex.jpg"
    }
  ],
  "count": 25
}
GET /dinosaurs/{id}

Retrieve detailed information about a specific dinosaur.

Path Parameters:
Parameter Type Description
id integer Dinosaur ID
Example Response:
{
  "status": "success",
  "data": {
    "id": 1,
    "name": "Tyrannosaurus Rex",
    "scientific_name": "Tyrannosaurus rex",
    "period": "cretaceous",
    "diet": "carnivore",
    "length": "12-13 meters",
    "weight": "8-14 tons",
    "height": "4-5 meters",
    "speed": "25-40 km/h",
    "description": "Detailed description...",
    "habitat": "North America",
    "discovered": "1902",
    "images": [...],
    "videos": [...],
    "audio": [...]
  }
}
GET /search

Search dinosaurs by name or description.

Query Parameters:
Parameter Type Description
q string Search query (required)
lang string Language code
GET /periods

Retrieve information about geological periods.

Example Response:
{
  "status": "success",
  "data": [
    {
      "name": "Triassic",
      "start": "252 million years ago",
      "end": "201 million years ago",
      "description": "First dinosaurs appeared..."
    }
  ]
}

Code Examples

JavaScript (Fetch API)

fetch('https://dino.nbultra.site//api/v1/dinosaurs')
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

Python (Requests)

import requests

response = requests.get('https://dino.nbultra.site//api/v1/dinosaurs')
data = response.json()
print(data)

cURL

curl -X GET "https://dino.nbultra.site//api/v1/dinosaurs?period=jurassic" \
  -H "User-Agent: MyApp/1.0"

Rate Limits

To ensure fair usage and system stability, the following rate limits apply:

Tier Requests per Hour Requests per Day
Anonymous 100 1,000
Registered (Future) 1,000 10,000
Rate limit information is included in response headers:
  • X-RateLimit-Limit: Maximum requests allowed
  • X-RateLimit-Remaining: Requests remaining
  • X-RateLimit-Reset: Time when limit resets (Unix timestamp)

Error Codes

The API uses standard HTTP status codes:

Code Status Description
200 OK Request successful
400 Bad Request Invalid parameters
404 Not Found Resource not found
429 Too Many Requests Rate limit exceeded
500 Internal Server Error Server error
Error Response Format:
{
  "status": "error",
  "message": "Resource not found",
  "code": 404
}
Need Help?

If you have questions or need assistance with the API, please contact us or visit our help center.