畜産クラウド_牛飼養頭数・施設数等データ取得API:Get/{LivestockNotificationInfoId}
- 公開日
- 更新日 2025-03-18
利用条件
概要
API名称
カテゴリー
説明
畜産クラウド全国推進協議会が提供する、牛の飼養頭数・施設数・と畜頭数・出生頭数・死亡頭数・輸入頭数等の届出情報統計です。
本APIの利用にあたっては利用規約への同意の上、別途利用申請が必要です。
ご利用の際は以下の「農業データ連携基盤(WAGRI)利⽤・変更申請ページ」からご申請をお願い申し上げます。
https://wagri-subscription.db.naro.go.jp/ords/r/prd/subscription/pre-registration
添付ファイル
■マニュアル
■利用規約
■コード一覧
関連メソッド
- ー
データの更新頻度
リクエスト
新URL
New!
https://api.wagri2.net/MaffOpenData/market/LivestockNotificationInfoStatistics/Get/{LivestockNotificationInfoId}
旧URL(2025年度末で終了予定)
https://api.wagri.net/API/MaffOpenData/Private/LivestockNotificationInfoStatistics/Get/{LivestockNotificationInfoId}
説明
登録されている畜産クラウドの牛の飼養頭数や施設数等のデータを1件指定して取得できます。 JSON形式のレスポンス情報に含まれており、特定の1件を指定して取得する際に利用します。 主キーはJSON形式のレスポンス情報に含まれており、Odataによるフィルター検索で取得できます。 主キー以外の条件抽出に関しても、Odataで取得可能です。
HTTPメソッド
パラメータ
URLデータ定義
畜産届出情報統計(PK)
名称 | 値 | 型 | 値の説明 |
---|---|---|---|
LivestockNotificationInfoId | 畜産届出情報ID | string, null |
URL説明
JSON型式のレスポンスに含まれており、データ1件を特定するための一意のキーとなります。
新呼出例
New!
https://api.wagri2.net/MaffOpenData/market/LivestockNotificationInfoStatistics/Get/02-令和5年1月末時点-宮城県–雄-ホルスタイン種—2023-01
旧呼出例(2025年度末で終了予定)
https://api.wagri.net/API/MaffOpenData/Private/LivestockNotificationInfoStatistics/Get/02-令和5年1月末時点-宮城県–雄-ホルスタイン種—2023-01
レスポンス
レイアウト
レスポンスデータ定義
畜産届出情報統計
名称 | 値 | 型 | 値の説明 |
---|---|---|---|
AggregateName | 集計名称 | string | Required Max Length: 12 |
AggregateTypeCode | 集計種別コード | string, null | Max Length: 2 |
Breed | 品種 | string | Required Max Length: 13 |
City | 市区町村 | string, null | Max Length: 20 |
FileName | ファイル名 | string | Required Max Length: 255 |
Gender | 性別 | string, null | Max Length: 1 |
ImportedFrom | 輸入元 | string, null | Max Length: 7 |
InformationUpdateDate | 報告更新日時 | string | Required Format: date-time |
LivestockNotificationInfoId | 畜産届出情報ID | string, null | |
Month | 月 | integer, null | Minimum: 1 Maximum: 12 |
MonthAge | 月齢 | string, null | Max Length: 5 |
Number | 頭数/施設数 | integer, null | Maximum: 9999999 |
NumberNonNumeric | 頭数/施設数(非数値) | string, null | Max Length: 10 |
Prefecture | 都道府県 | string, null | Max Length: 6 |
TargetYearMonth | 年月 | string | Required Max Length: 7 |
Year | 年 | integer | Required Maximum: 9999 |
YearOnYear | 対前年比(%) | number, null | Format: Number(10,1) |
YearOnYearNonNumeric | 対前年比(非数値) | string, null | Max Length: 10 |
レスポンス説明
畜産届出情報統計
レスポンス例
{ "AggregateName": "令和5年1月末時点", "AggregateTypeCode": "02", "Breed": "ホルスタイン種", "City": null, "FileName": "Type_Sex_BreedingNumber_pref_202301.xlsx", "Gender": "雄", "ImportedFrom": null, "InformationUpdateDate": "2023-03-07T05:38:39", "LivestockNotificationInfoId": "02-令和5年1月末時点-宮城県--雄-ホルスタイン種---2023-01", "Month": 1, "MonthAge": null, "Number": 823, "NumberNonNumeric": null, "Prefecture": "宮城県", "TargetYearMonth": "2023-01", "Year": 2023, "YearOnYear": null, "YearOnYearNonNumeric": null, "id": "API~MaffOpenData~Private~LivestockNotificationInfoStatistics~1~02~令和5年1月末時点~宮城県~~雄~ホルスタイン種~~~2023-01", "_Owner_Id": "ac31a63b-e520-4cb0-8573-7ca34c2f269c" }
ステータスコード
コード | 名称 | 値の説明 |
---|---|---|
400 | Bad Request | リクエストが不正です。 |
403 | Forbidden | リソースのアクセスが禁止されています。 |
500 | Internal Server Error | サーバー内部でエラーが発生しました。 |
401 | Unauthorized | 認証情報が不正です。 |
サンプルソースコード
プログラム記述例(WAGRI共通)
import requests url = "https://api.wagri.net/API/Public/AgriculturalLand/SearchByCityCode" payload = { 'CityCode': '432041' } headers = { 'X-Authorization': 'アクセストークン', } response = requests.get(url, headers=headers, params=payload) print(response.text)
プログラム記述例(個別API)
ー