example-data.com
Menu
Browse docs and collections

pets

pets

Page 9 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": 193,
      "ownerUserId": 196,
      "name": "Nola",
      "species": "cat",
      "breedId": 31,
      "gender": "male",
      "birthDate": "2012-03-24",
      "weightKg": 3.6,
      "color": "Tortoiseshell",
      "imageUrl": "https://picsum.photos/seed/pet-193/600/600",
      "createdAt": "2017-11-03T05:08:25.251Z",
      "updatedAt": "2024-10-03T08:34:17.724Z"
    },
    {
      "id": 194,
      "ownerUserId": 196,
      "name": "Daisy",
      "species": "dog",
      "breedId": 18,
      "gender": "male",
      "birthDate": "2016-04-18",
      "weightKg": 36.2,
      "color": "Black",
      "imageUrl": "https://picsum.photos/seed/pet-194/600/600",
      "createdAt": "2015-11-16T14:13:32.246Z",
      "updatedAt": "2022-06-24T16:16:01.955Z"
    },
    {
      "id": 195,
      "ownerUserId": 199,
      "name": "Abbie",
      "species": "cat",
      "breedId": 45,
      "gender": "female",
      "birthDate": "2017-09-20",
      "weightKg": 3.3,
      "color": "Tabby",
      "imageUrl": "https://picsum.photos/seed/pet-195/600/600",
      "createdAt": "2022-04-27T05:17:29.622Z",
      "updatedAt": "2026-01-24T07:02:56.262Z"
    }
  ],
  "meta": {
    "page": 9,
    "limit": 24,
    "total": 200,
    "totalPages": 9
  },
  "links": {
    "self": "/api/v1/pets?page=9&limit=24",
    "first": "/api/v1/pets?page=1&limit=24",
    "last": "/api/v1/pets?page=9&limit=24",
    "next": null,
    "prev": "/api/v1/pets?page=8&limit=24"
  }
}