example-data.com
Menu
Browse docs and collections

categories

categories

Browse 40 categories records. Explore sample records and fetch JSON over a free REST API for prototypes, tests, and learning.

Overview

Cards

Compact

Detailed

Electronics

Consumer electronics, gadgets, and technology hardware.

Clothing & Apparel

Men's, women's, and children's clothing, shoes, and accessories.

Home & Garden

Furniture, décor, tools, and garden supplies for the home.

Sports & Outdoors

Equipment, apparel, and gear for sports and outdoor activities.

Books & Media

Books, e-books, music, movies, and digital media content.

Health & Beauty

Personal care, cosmetics, wellness, and pharmacy products.

Showing first 6 of 24 on this page.

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/categories?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/categories?limit=25"
);
const { data, meta } = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/categories.d.ts https://example-data.com/types/categories.d.ts
import type { Category, ListEnvelope } from "./types/categories";

const res = await fetch(
  "https://example-data.com/api/v1/categories?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Category>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/categories",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 1,
      "name": "Electronics",
      "slug": "electronics",
      "description": "Consumer electronics, gadgets, and technology hardware.",
      "parentId": null,
      "sortOrder": 1
    },
    {
      "id": 2,
      "name": "Clothing & Apparel",
      "slug": "clothing-apparel",
      "description": "Men's, women's, and children's clothing, shoes, and accessories.",
      "parentId": null,
      "sortOrder": 2
    },
    {
      "id": 3,
      "name": "Home & Garden",
      "slug": "home-garden",
      "description": "Furniture, décor, tools, and garden supplies for the home.",
      "parentId": null,
      "sortOrder": 3
    }
  ],
  "meta": {
    "page": 1,
    "limit": 25,
    "total": 40,
    "totalPages": 2
  },
  "links": {
    "self": "/api/v1/categories?page=1",
    "first": "/api/v1/categories?page=1",
    "last": "/api/v1/categories?page=2",
    "next": "/api/v1/categories?page=2",
    "prev": null
  }
}

View full response →