メインコンテンツまでスキップ

品種の操作

猫種の情報を一覧・検索します。

すべての品種を一覧

curl -H "x-api-key: YOUR-API-KEY" https://api.thecatapi.com/v1/breeds

品種を検索

curl -H "x-api-key: YOUR-API-KEY" "https://api.thecatapi.com/v1/breeds/search?q=siamese"

品種グループで絞り込む

breed_groups または exclude_breed_groups(カンマ区切り、大文字小文字を区別しない)でグループを含めたり除外したりできます。GET /v1/breeds/breed-groups で利用可能なグループを取得できます。

curl -H "x-api-key: YOUR-API-KEY" "https://api.thecatapi.com/v1/breeds?breed_groups=Short-haired,Rex"

品種の詳細を取得

猫種のIDは4文字のコードです。例: abys はアビシニアン、beng はベンガル、siam はシャム。

curl -H "x-api-key: YOUR-API-KEY" https://api.thecatapi.com/v1/breeds/beng

レスポンス例

{
"id": "abys",
"name": "Abyssinian",
"species_id": "1",
"life_span": "14-17",
"temperament": "Active, Energetic, Independent, Intelligent, Gentle, Curious, Playful",
"origin": "Egypt",
"country_code": "EG",
"breed_group": "Short-haired",
"reference_image_id": "KWdLHmOqc",
"image": {
"id": "KWdLHmOqc",
"url": "https://cdn2.thecatapi.com/images/KWdLHmOqc.jpg",
"width": 3114,
"height": 2609
},
"affection_level": 3,
"energy_level": 3,
"vocalisation": 3,
"hypoallergenic": false
}

ローカライズと翻訳

Startup および Enterprise アカウントでは品種データがローカライズされます。猫種の名前は原産国の主要言語で表記され、テキスト項目は翻訳されます。

lang クエリパラメータでレスポンスの言語を指定します(例: endeesfrit)。すべての /breeds エンドポイントで利用できます:

https://api.thecatapi.com/v1/breeds?lang=de
https://api.thecatapi.com/v1/breeds/beng?lang=de

品種の豆知識を一覧

curl -H "x-api-key: YOUR-API-KEY" "https://api.thecatapi.com/v1/facts/breed/abys?limit=5"