pets
pets
Page 8 of 9.
Overview
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets?limit=25"
JavaScript example
const res = await fetch(
"https://example-data.com/api/v1/pets?limit=25"
);
const { data, meta } = await res.json(); TypeScript example
// Download once: mkdir -p types && curl -o types/pets.d.ts https://example-data.com/types/pets.d.ts
import type { Pet, ListEnvelope } from "./types/pets";
const res = await fetch(
"https://example-data.com/api/v1/pets?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Pet>; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets",
params={"limit": 25},
)
data = res.json() Response
{
"data": [
{
"id": 169,
"ownerUserId": 177,
"name": "Laisha",
"species": "cat",
"breedId": 31,
"gender": "unknown",
"birthDate": "2011-10-14",
"weightKg": 4.4,
"color": "Orange",
"imageUrl": "https://picsum.photos/seed/pet-169/600/600",
"createdAt": "2020-09-20T13:12:17.896Z",
"updatedAt": "2025-02-07T04:16:21.318Z"
},
{
"id": 170,
"ownerUserId": 178,
"name": "Monroe",
"species": "cat",
"breedId": 49,
"gender": "male",
"birthDate": "2020-11-30",
"weightKg": 2,
"color": "Tuxedo",
"imageUrl": "https://picsum.photos/seed/pet-170/600/600",
"createdAt": "2023-01-26T06:48:44.781Z",
"updatedAt": "2026-04-21T21:14:04.073Z"
},
{
"id": 171,
"ownerUserId": 178,
"name": "Tessie",
"species": "dog",
"breedId": null,
"gender": "male",
"birthDate": "2023-08-01",
"weightKg": 33.4,
"color": "Tan",
"imageUrl": "https://picsum.photos/seed/pet-171/600/600",
"createdAt": "2015-11-04T16:59:23.700Z",
"updatedAt": "2022-11-24T03:06:20.946Z"
}
],
"meta": {
"page": 8,
"limit": 24,
"total": 200,
"totalPages": 9
},
"links": {
"self": "/api/v1/pets?page=8&limit=24",
"first": "/api/v1/pets?page=1&limit=24",
"last": "/api/v1/pets?page=9&limit=24",
"next": "/api/v1/pets?page=9&limit=24",
"prev": "/api/v1/pets?page=7&limit=24"
}
}