Skip to main content

Query Japanese open data on Queria (data.queria.io) from the terminal, Python, and MCP

Project description

queria

English | 日本語

Query Japanese open data on Queria from the terminal, Python, and MCP.

A read-only client for exploring Japanese open data published on Queria — e-Stat, National Land Numerical Information, EDINET, the Japan Meteorological Agency, and more — from the terminal, Python, and MCP. The data is published in DuckLake format, and all computation runs locally in DuckDB.

Installation

uvx queria list          # run without installing
pip install queria       # or install normally

Requires Python 3.10+.

Usage

queria list                              # list datasets
queria search 人口                        # search datasets, tables and columns
queria info e_stat                       # metadata (license, source, etc.)
queria schema e_stat                     # list tables
queria columns e_stat mart_population    # list columns
queria summarize zipcode.main.zipcodes   # per-column statistics (scans the whole table)
queria sql "SELECT * FROM zipcode.main.zipcodes LIMIT 10"
queria sql "SELECT * FROM zipcode.main.zipcodes" --out zipcodes.parquet

Tables are referenced as <dataset>.<schema>.<table>. Referenced datasets are attached automatically.

API token

The client works without a token, but rate limits apply. Registering a token issued at https://queria.io/profile/api-keys raises the limit:

queria auth set-token <token>   # saved to ~/.config/queria/config.toml
queria auth status              # check

You can also pass a token via the --token option or the QUERIA_TOKEN environment variable (in that order of precedence).

Python API

import queria

with queria.connect() as conn:
    conn.sql("SELECT * FROM catalog.main.mart_datasets").show()

MCP server

Works with MCP clients such as Claude Code, Claude Desktop, and Cursor:

{
  "mcpServers": {
    "queria": {
      "command": "uvx",
      "args": ["--from", "queria[mcp]", "queria", "mcp"]
    }
  }
}

The query tool only runs SELECT statements against the Queria catalog. Besides writes, it rejects functions that read local files or arbitrary URLs (read_text / read_csv / glob / ST_Read, etc.) and dynamic SQL (query()), so agents processing untrusted data cannot use it to read local files or perform SSRF against internal endpoints. If you need unrestricted SQL, such as joining with local data, use the CLI (queria sql).

Telemetry

To help improve the tool, we collect anonymous usage data (command name, success/failure, version, and target dataset name). SQL contents, file paths, and personal information are never sent. Opt out with any of the following:

queria telemetry disable        # saved to the config file
export DO_NOT_TRACK=1           # standard environment variable
export QUERIA_NO_TELEMETRY=1

Details: https://docs.queria.io/telemetry

Documentation

https://docs.queria.io/

The docs are also served in agent-readable form:

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

queria-0.5.0.tar.gz (101.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

queria-0.5.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file queria-0.5.0.tar.gz.

File metadata

  • Download URL: queria-0.5.0.tar.gz
  • Upload date:
  • Size: 101.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for queria-0.5.0.tar.gz
Algorithm Hash digest
SHA256 6c4974b2a12d1b92595eb79fcc19b1760ffad984bb0c6f5f237556b50f994019
MD5 d9403d60d23b3d728424959347af57f9
BLAKE2b-256 f218a5fb4f6fa1f8b96158a1b9bd086c1bd72fbf25985ace8f91b26d766bc491

See more details on using hashes here.

Provenance

The following attestation bundles were made for queria-0.5.0.tar.gz:

Publisher: release.yml on queria-io/queria-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file queria-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: queria-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for queria-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2aa54bd78e746e702eb33404b1f0fc5a940413c4539f3ed644a76e2f2795f00
MD5 61e9a706c94b0338548be182e20b3551
BLAKE2b-256 8518e6af5a51bf53763600dd2df2453e91910bed8e98ae8136d13b7dc076cf62

See more details on using hashes here.

Provenance

The following attestation bundles were made for queria-0.5.0-py3-none-any.whl:

Publisher: release.yml on queria-io/queria-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page