{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/animalchecklist-com/json-schema/animalchecklist-com-animal-schema.json",
  "title": "Animal",
  "description": "One animal taxon with every name, photo credit, summary and country counts.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/animalchecklist-com-openapi.json#/components/schemas/Animal",
  "type": "object",
  "required": [
    "id",
    "name",
    "nameEn",
    "nameSci",
    "categoryId",
    "habitats",
    "image",
    "names",
    "wikidataId",
    "inatId",
    "obs",
    "text",
    "countries"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
      "description": "Slug of the animal taxon, for example `red-fox`."
    },
    "name": {
      "type": "string",
      "description": "Name in the requested language, English when none exists."
    },
    "nameEn": {
      "type": "string",
      "description": "English common name."
    },
    "nameSci": {
      "type": "string",
      "description": "Scientific name."
    },
    "taxonRank": {
      "type": "string",
      "default": "species",
      "description": "Taxonomic rank. Legacy records default to species."
    },
    "parentNameSci": {
      "type": [
        "string",
        "null"
      ],
      "description": "Parent species scientific name for a subspecies. Null for species."
    },
    "categoryId": {
      "type": "string",
      "enum": [
        "mammals",
        "birds",
        "reptiles",
        "amphibians",
        "fish",
        "insects",
        "other"
      ]
    },
    "habitats": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "forest",
          "grassland",
          "freshwater",
          "sea",
          "mountains",
          "urban",
          "farm",
          "zoo",
          "savanna",
          "jungle",
          "arctic",
          "desert"
        ]
      }
    },
    "tickable": {
      "type": "boolean",
      "description": "Whether a new checklist sighting is allowed."
    },
    "sourceUrl": {
      "type": "string",
      "format": "uri"
    },
    "image": {
      "anyOf": [
        {
          "type": "object",
          "description": "Photo credit. Check the licence and source before reuse.",
          "required": [
            "url",
            "sourceUrl",
            "license",
            "author",
            "source"
          ],
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "sourceUrl": {
              "type": "string",
              "format": "uri",
              "description": "Page to link when you show it."
            },
            "license": {
              "type": "string",
              "enum": [
                "CC0",
                "Public domain",
                "Pexels License",
                "Pixabay Content License"
              ]
            },
            "licenseUrl": {
              "type": "string",
              "format": "uri",
              "description": "Licence terms or public-domain status guidance."
            },
            "author": {
              "type": "string",
              "description": "Credited author. Empty when the source gives no name."
            },
            "source": {
              "type": "string",
              "enum": [
                "inaturalist",
                "commons",
                "gbif",
                "pexels",
                "pixabay"
              ],
              "description": "Photo source."
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "names": {
      "type": "object",
      "description": "Common name per language. A language is absent when no name is known.",
      "propertyNames": {
        "enum": [
          "en",
          "de",
          "es",
          "fr",
          "it",
          "nl",
          "pt",
          "pl"
        ]
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "wikidataId": {
      "type": [
        "string",
        "null"
      ]
    },
    "inatId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "iNaturalist taxon id."
    },
    "obs": {
      "type": [
        "integer",
        "null"
      ],
      "description": "iNaturalist observation count when available."
    },
    "text": {
      "type": [
        "object",
        "null"
      ],
      "description": "Wikipedia excerpt. Keep attribution, licence and source links, changes and supplied notices. Check source article exceptions.",
      "required": [
        "lang",
        "summary",
        "sourceUrl"
      ],
      "properties": {
        "lang": {
          "type": "string",
          "enum": [
            "en",
            "de",
            "es",
            "fr",
            "it",
            "nl",
            "pt",
            "pl"
          ]
        },
        "summary": {
          "type": "string"
        },
        "sourceUrl": {
          "type": "string",
          "format": "uri"
        },
        "license": {
          "type": "string"
        },
        "licenseUrl": {
          "type": "string",
          "format": "uri"
        },
        "attribution": {
          "type": "string"
        },
        "changes": {
          "type": "string"
        },
        "notice": {
          "type": "string"
        }
      }
    },
    "countries": {
      "type": "array",
      "description": "Up to twelve countries with the most observations.",
      "items": {
        "type": "object",
        "required": [
          "code",
          "obs"
        ],
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[A-Z]{2}$",
            "description": "ISO 3166-1 alpha-2."
          },
          "obs": {
            "type": "integer"
          }
        }
      }
    }
  }
}