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

品種の操作

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

すべての品種を一覧​

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

品種を検索​

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

品種グループで絞り込む​

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

curl -H "x-api-key: YOUR-API-KEY" "https://api.thedogapi.com/v1/breeds?breed_groups=Toy,Working"

品種の詳細を取得​

犬種のIDは数値です。例: 1 はアーフェンピンシャー、115 はジャーマン・シェパード。

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

レスポンス例​

{
"id": "1",
"name": "Affenpinscher",
"species_id": "2",
"life_span": "12-15",
"temperament": "Confident, alert, playful, loyal, courageous",
"origin": "Germany",
"country_code": "DE",
"breed_group": "Toy",
"reference_image_id": "BJa4kxc4X",
"image": {
"id": "BJa4kxc4X",
"width": 1600,
"height": 1199,
"url": "https://cdn2.thedogapi.com/images/BJa4kxc4X.jpg"
}
}

ローカライズと翻訳​

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

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

https://api.thedogapi.com/v1/breeds?lang=de
https://api.thedogapi.com/v1/breeds/1?lang=de

品種の豆知識を一覧​

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