get_specific_e_stat_data
Retrieve specific statistical data from the e-Stat API using a dataset ID or statistics table ID. Specify the data set or stats table ID to fetch numeric data with optional pagination.
Instructions
Retrieves specific statistics data from the E-Stat API.
機能名:統計データ取得
指定した統計表ID又はデータセットIDに対応する統計データ(数値データ)を取得します。
Args:
data_set_id (str or None): The ID of the dataset(データセットID).
stats_data_id (str or None): The ID of the statistics data(統計表ID).
# Ensure that either data_set_id or stats_data_id is provided, but not both
if not data_set_id and not stats_data_id:
raise ValueError("Either 'data_set_id' or 'stats_data_id' must be provided.")
if data_set_id and stats_data_id:
raise ValueError("Only one of 'data_set_id' or 'stats_data_id' should be provided.")
startPosition (int): The starting position for the search results.
Defaults to 1. For example:
- To get the first 100 results, set startPosition to 1.
- To get the next 100 results, set startPosition to 101.
limit (int): The maximum number of results to retrieve.
Defaults to 100.
Returns:
str: The response text from the E-Stat API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| data_set_id | No | ||
| startPosition | No | ||
| stats_data_id | No |