Dinosaurs by Diet
API Endpoint and Description
Section titled “API Endpoint and Description”GET {baseUrl}/api/v1/dinosaurs/diet/{diet}`Returns all dinosaurs matching a specific diet.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
diet | string | Yes | The diet type of dinosaurs to retrieve | "herbivore" |
Valid Values: carnivore, herbivore, omnivore, piscivore
Response Structure
Section titled “Response Structure”{ "count": 650, "data": [ { "id": 1118, "name": "Zephyrosaurus", "temporalRange": "Early Cretaceous, ~113 Ma", "diet": "herbivore", "locomotionType": "biped", "description": "...", "classificationInfo": {...}, "image": {...}, "source": {...} } ]}