---
search:
  tags:
    - Operations
    - POST
seo:
  description: >-
    歳出の木のノード（款・項・目と、節・備考など別の軸の内訳）を条件で絞って一覧す… Reference for the POST
    /v1/expenditure/nodes:search endpoint in the 風土記 API.
sidebar:
  label: 歳出の木のノードの検索
  badge: POST
title: 歳出の木のノードの検索
type: openapi-operation
---
歳出の木のノード（款・項・目と、節・備考など別の軸の内訳）を条件で絞って一覧する。検索の前に describe_expenditure_columns を一度読む。団体の比較は node_kind を "目" などに絞って行い、詳細は get_expenditure_node で木を辿る。資料区分や軸の違う金額を足さない。足すときは describe_expenditure_columns の sum_rules に従う。where は列をまたぐ OR・NOT が無いので、2回に分けて問い合わせる。

`POST /v1/expenditure/nodes:search`

**Request body** (`application/json`, required)

- `document_kind` (string, required) — 資料区分。表の選択に使う。必須。
- `fiscal_year` (object, required) — 会計年度（西暦）の範囲。幅は 5 年以内（max - min \<= 4）。必須。
- `where` (object) — 列ごとの条件。列どうしは AND。
- `order_by` (object[]) — 並び順。末尾に node\_id が足される。
- `page_size` (integer) — 1ページの件数。
- `page_token` (string) — 前回の応答の next\_page\_token。page\_size 以外は前回と同じ入力にする。

Request body example:

```json
{
  "document_kind": "settlement",
  "fiscal_year": {
    "min": 2025,
    "max": 2025
  },
  "where": {
    "node_kind": {
      "eq": [
        "目"
      ]
    },
    "cofog_code": {
      "prefix": "10.4"
    }
  },
  "order_by": [
    {
      "column": "amount_yen",
      "desc": true
    }
  ],
  "page_size": 50
}
```

**Responses**

- `200` — 成功
- `400` — 入力が不正
- `404` — 見つからない
- `413` — body が 16384 バイトを超える
- `415` — Content-Type が application/json でない
- `503` — 提供を止めている

Response example, 200:

```json
{
  "nodes": [
    {
      "document_kind": "string",
      "node_id": "string",
      "parent_node_id": "string",
      "jurisdiction_code": "string",
      "fiscal_year": 0,
      "account_name": "string",
      "axis": "string",
      "is_subject": true,
      "node_kind": "string",
      "code": "string",
      "name": "string",
      "amount_yen": 0,
      "is_leaf": true,
      "kan_code": "string",
      "kou_code": "string",
      "moku_code": "string",
      "origin_id": "string",
      "source_page": 0,
      "source_x0": 0,
      "source_y0": 0,
      "source_x1": 0,
      "source_y1": 0,
      "amount_source_page": 0,
      "amount_source_x0": 0,
      "amount_source_y0": 0,
      "amount_source_x1": 0,
      "amount_source_y1": 0,
      "kan_name": "string",
      "kou_name": "string",
      "cofog_status": "string",
      "cofog_code": "string",
      "account_kind": "string",
      "is_interfund_transfer": true,
      "interfund_transfer_to": "string",
      "expenditure_setsu_id": "string"
    }
  ],
  "next_page_token": "string",
  "origins": [
    {
      "origin_id": "string",
      "jurisdiction_code": "string",
      "fiscal_year": 0,
      "document_kind": "string",
      "amendment_number": 0,
      "title": "string",
      "url": "string",
      "format": "string",
      "sha256": "string"
    }
  ]
}
```
