example-data.com
Menu
Browse docs and collections

pets

pets

Page 2 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": 25,
      "ownerUserId": 33,
      "name": "Juston",
      "species": "bird",
      "breedId": null,
      "gender": "unknown",
      "birthDate": "2017-08-19",
      "weightKg": 0.57,
      "color": "Multi-color",
      "imageUrl": "https://picsum.photos/seed/pet-25/600/600",
      "createdAt": "2011-08-07T23:19:58.889Z",
      "updatedAt": "2024-04-11T23:52:58.974Z"
    },
    {
      "id": 26,
      "ownerUserId": 34,
      "name": "Wilbert",
      "species": "bird",
      "breedId": 60,
      "gender": "unknown",
      "birthDate": "2022-02-07",
      "weightKg": 0.6,
      "color": "Red",
      "imageUrl": "https://picsum.photos/seed/pet-26/600/600",
      "createdAt": "2018-08-28T05:55:30.919Z",
      "updatedAt": "2023-10-23T19:58:54.086Z"
    },
    {
      "id": 27,
      "ownerUserId": 36,
      "name": "Dannie",
      "species": "other",
      "breedId": null,
      "gender": "male",
      "birthDate": "2014-04-27",
      "weightKg": 3.53,
      "color": "Gray",
      "imageUrl": "https://picsum.photos/seed/pet-27/600/600",
      "createdAt": "2020-06-10T09:56:35.059Z",
      "updatedAt": "2026-02-03T07:16:14.367Z"
    }
  ],
  "meta": {
    "page": 2,
    "limit": 24,
    "total": 200,
    "totalPages": 9
  },
  "links": {
    "self": "/api/v1/pets?page=2&limit=24",
    "first": "/api/v1/pets?page=1&limit=24",
    "last": "/api/v1/pets?page=9&limit=24",
    "next": "/api/v1/pets?page=3&limit=24",
    "prev": "/api/v1/pets?page=1&limit=24"
  }
}