Cat Facts (catfact.ninja) Breeds API

Catalog of cat breeds with country, origin, coat, and pattern.

OpenAPI Specification

cat-facts-catfact-breeds-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Cat Facts Breeds API
  description: 'A free, no-authentication REST API at catfact.ninja serving random cat trivia and a catalog of cat breeds. Three GET endpoints: /fact (a single random fact), /facts (paginated list of facts), and /breeds (paginated list of breeds). Designed as a canonical "hello world" public API for tutorials, demos, and agent tool examples.'
  contact:
    name: Cat Facts API
    email: contact@catfact.ninja
    url: https://catfact.ninja/
  license:
    name: Free Public API
    url: https://catfact.ninja/
  version: 1.0.0
  x-generated-from: documentation
  x-source-url: https://catfact.ninja/docs?api-docs.json
  x-last-validated: '2026-05-30'
servers:
- url: https://catfact.ninja
  description: Cat Facts API production server.
tags:
- name: Breeds
  description: Catalog of cat breeds with country, origin, coat, and pattern.
paths:
  /breeds:
    get:
      tags:
      - Breeds
      summary: Get a List of Breeds
      description: Returns a paginated list of cat breeds with country, origin, coat, and pattern attributes. Supports a limit query parameter for page size. The response follows Laravel's paginator format with current_page, per_page, total, last_page, links, and a data array of Breed objects.
      operationId: getBreeds
      parameters:
      - name: limit
        in: query
        description: Number of breeds to return per page.
        required: false
        schema:
          type: integer
          format: int32
          minimum: 1
          example: 10
      responses:
        '200':
          description: A paginated list of cat breeds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BreedList'
              examples:
                GetBreeds200Example:
                  summary: Default getBreeds 200 response
                  x-microcks-default: true
                  value:
                    current_page: 1
                    data:
                    - breed: Abyssinian
                      country: Ethiopia
                      origin: Natural/Standard
                      coat: Short
                      pattern: Ticked
                    - breed: Aegean
                      country: Greece
                      origin: Natural/Standard
                      coat: Semi-long
                      pattern: Bi- or tri-colored
                    first_page_url: https://catfact.ninja/breeds?page=1
                    from: 1
                    last_page: 49
                    last_page_url: https://catfact.ninja/breeds?page=49
                    next_page_url: https://catfact.ninja/breeds?page=2
                    path: https://catfact.ninja/breeds
                    per_page: 2
                    prev_page_url: null
                    to: 2
                    total: 98
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    PaginationLink:
      type: object
      title: PaginationLink
      description: A single navigation link in a Laravel-style paginator response.
      properties:
        url:
          type: string
          nullable: true
          description: Target URL of the link, or null for disabled controls.
          example: https://catfact.ninja/facts?page=2
        label:
          type: string
          description: Display label (page number, "Previous", "Next", or "...").
          example: '2'
        active:
          type: boolean
          description: Whether this link represents the current page.
          example: false
    Breed:
      type: object
      title: Breed
      description: A cat breed entry with descriptive attributes.
      properties:
        breed:
          type: string
          description: Common breed name.
          example: Abyssinian
        country:
          type: string
          description: Country the breed is associated with.
          example: Ethiopia
        origin:
          type: string
          description: Origin classification (Natural/Standard, Mutation, Crossbreed, etc.).
          example: Natural/Standard
        coat:
          type: string
          description: Coat length descriptor (Short, Semi-long, Long, Hairless).
          example: Short
        pattern:
          type: string
          description: Coat pattern descriptor.
          example: Ticked
      required:
      - breed
      - country
      - origin
      - coat
      - pattern
    BreedList:
      type: object
      title: BreedList
      description: Laravel-style paginated wrapper around a list of Breed objects.
      properties:
        current_page:
          type: integer
          format: int32
          example: 1
        data:
          type: array
          items:
            $ref: '#/components/schemas/Breed'
        first_page_url:
          type: string
          example: https://catfact.ninja/breeds?page=1
        from:
          type: integer
          format: int32
          nullable: true
          example: 1
        last_page:
          type: integer
          format: int32
          example: 49
        last_page_url:
          type: string
          example: https://catfact.ninja/breeds?page=49
        links:
          type: array
          items:
            $ref: '#/components/schemas/PaginationLink'
        next_page_url:
          type: string
          nullable: true
          example: https://catfact.ninja/breeds?page=2
        path:
          type: string
          example: https://catfact.ninja/breeds
        per_page:
          type: integer
          format: int32
          example: 10
        prev_page_url:
          type: string
          nullable: true
          example: null
        to:
          type: integer
          format: int32
          nullable: true
          example: 10
        total:
          type: integer
          format: int32
          example: 98