REST · v1

APIリファレンス

プログラムからアクセスできる読み取り専用のHachiquant API。

ベースパス
https://hachiquant.com/api/v1
認証

キーは不要です。すべてのエンドポイントが公開で、匿名リクエストはIP単位でレート制限されます。

クイックスタート
curl https://hachiquant.com/api/v1/companies/7203
OpenAPIをダウンロード

System

Liveness and machine-readable schema.

get /api/v1/health
Liveness check

Returns 200 with a database connectivity probe. Open (no key).

リクエスト例
curl https://hachiquant.com/api/v1/health
レスポンス
  • 200 The service and its database pool are healthy.
get /api/v1/openapi.json
This OpenAPI document

Returns the OpenAPI 3.1 schema you are reading. Open (no key).

リクエスト例
curl https://hachiquant.com/api/v1/openapi.json
レスポンス
  • 200 The OpenAPI schema.

Companies

Search and company identity.

get /api/v1/companies
Search companies

Free-text search over securities code and JP/EN name. Open (no key).

パラメーター
q querystringSecurities code or name substring (JP or EN). Empty q lists the universe, code-ordered. Longer than 200 characters returns 400.
limit queryintegerMaximum rows (default 50, max 200; larger values are capped). Non-integer values return 400.
offset queryintegerRows to skip, for paging the full universe. Non-integer values return 400.
リクエスト例
curl https://hachiquant.com/api/v1/companies?q=toyota
レスポンス
  • 200 Matching companies, best match first.
  • 400 Malformed request (e.g. a non-numeric screener bound).
  • 429 Per-IP quota exceeded.
get /api/v1/companies/{ticker}
Company profile

Identity for a single company, resolved from its ticker.

パラメーター
ticker 必須pathstringSecurities code without the trailing check digit, e.g. 7203 for Toyota. Values containing control characters (e.g. an embedded percent-encoded NUL) return 400; any other value that is not four ASCII digits or uppercase letters returns 404.
リクエスト例
curl https://hachiquant.com/api/v1/companies/7203
レスポンス
  • 200 The company's identity.
  • 400 Malformed request (e.g. a non-numeric screener bound).
  • 404 No such company.
  • 429 Per-IP quota exceeded.

Financials

Statements, filings, and raw XBRL facts.

get /api/v1/line-items
Canonical line-item map

Every canonical statement line in display order, with its labels, role, section and the XBRL elements that satisfy it. The layout that view=canonical statements are placed on by key: a line a filing does not report is absent from that period's lines but present here. Static data; open (no key).

リクエスト例
curl https://hachiquant.com/api/v1/line-items
レスポンス
  • 200 The line-item map.
get /api/v1/companies/{ticker}/income-statements
Income statements

Period-by-period income statements, newest first. Each period carries its raw XBRL records, or with view=canonical its canonical lines.

パラメーター
ticker 必須pathstringSecurities code without the trailing check digit, e.g. 7203 for Toyota. Values containing control characters (e.g. an embedded percent-encoded NUL) return 400; any other value that is not four ASCII digits or uppercase letters returns 404.
view querycanonicalcanonical returns each period's canonical line items (lines, plus basis) in place of its raw XBRL records: the normalized statement the web financials page renders, resolved within one consolidation scope. Any other value returns 400.
リクエスト例
curl https://hachiquant.com/api/v1/companies/7203/income-statements
レスポンス
  • 200 Income statements, one object per reporting period.
  • 400 Malformed request (e.g. a non-numeric screener bound).
  • 404 No such company.
  • 429 Per-IP quota exceeded.
get /api/v1/companies/{ticker}/balance-sheets
Balance sheets

Period-by-period balance sheets, newest first.

パラメーター
ticker 必須pathstringSecurities code without the trailing check digit, e.g. 7203 for Toyota. Values containing control characters (e.g. an embedded percent-encoded NUL) return 400; any other value that is not four ASCII digits or uppercase letters returns 404.
view querycanonicalcanonical returns each period's canonical line items (lines, plus basis) in place of its raw XBRL records: the normalized statement the web financials page renders, resolved within one consolidation scope. Any other value returns 400.
リクエスト例
curl https://hachiquant.com/api/v1/companies/7203/balance-sheets
レスポンス
  • 200 Balance sheets, one object per reporting period.
  • 400 Malformed request (e.g. a non-numeric screener bound).
  • 404 No such company.
  • 429 Per-IP quota exceeded.
get /api/v1/companies/{ticker}/cash-flow-statements
Cash flow statements

Period-by-period cash flow statements, newest first.

パラメーター
ticker 必須pathstringSecurities code without the trailing check digit, e.g. 7203 for Toyota. Values containing control characters (e.g. an embedded percent-encoded NUL) return 400; any other value that is not four ASCII digits or uppercase letters returns 404.
view querycanonicalcanonical returns each period's canonical line items (lines, plus basis) in place of its raw XBRL records: the normalized statement the web financials page renders, resolved within one consolidation scope. Any other value returns 400.
リクエスト例
curl https://hachiquant.com/api/v1/companies/7203/cash-flow-statements
レスポンス
  • 200 Cash flow statements, one object per reporting period.
  • 400 Malformed request (e.g. a non-numeric screener bound).
  • 404 No such company.
  • 429 Per-IP quota exceeded.
get /api/v1/companies/{ticker}/filings
Filing history

Filing (document) metadata for a company, so consumers can reach the original EDINET document. Also available at /documents.

パラメーター
ticker 必須pathstringSecurities code without the trailing check digit, e.g. 7203 for Toyota. Values containing control characters (e.g. an embedded percent-encoded NUL) return 400; any other value that is not four ASCII digits or uppercase letters returns 404.
リクエスト例
curl https://hachiquant.com/api/v1/companies/7203/filings
レスポンス
  • 200 Filing metadata, newest first.
  • 400 Malformed request (e.g. a non-numeric screener bound).
  • 404 No such company.
  • 429 Per-IP quota exceeded.
get /api/v1/companies/{ticker}/document-data
Raw XBRL facts

Every parsed XBRL data element for the company's filings (power/debug use).

パラメーター
ticker 必須pathstringSecurities code without the trailing check digit, e.g. 7203 for Toyota. Values containing control characters (e.g. an embedded percent-encoded NUL) return 400; any other value that is not four ASCII digits or uppercase letters returns 404.
リクエスト例
curl https://hachiquant.com/api/v1/companies/7203/document-data
レスポンス
  • 200 Raw financial data elements.
  • 400 Malformed request (e.g. a non-numeric screener bound).
  • 404 No such company.
  • 429 Per-IP quota exceeded.

Metrics

Computed ratios and the fundamental valuation block.

get /api/v1/companies/{ticker}/metrics
Computed metrics

Trimmed-core fundamental metrics for every reporting period, newest first. Values are decimals (ratios); null where inputs are missing.

パラメーター
ticker 必須pathstringSecurities code without the trailing check digit, e.g. 7203 for Toyota. Values containing control characters (e.g. an embedded percent-encoded NUL) return 400; any other value that is not four ASCII digits or uppercase letters returns 404.
リクエスト例
curl https://hachiquant.com/api/v1/companies/7203/metrics
レスポンス
  • 200 One metrics object per reporting period.
  • 400 Malformed request (e.g. a non-numeric screener bound).
  • 404 No such company.
  • 429 Per-IP quota exceeded.
get /api/v1/companies/{ticker}/valuation
Fundamental valuation

The fundamental valuation block (quality / return / leverage metrics) for the latest period, or the trailing-twelve-month window with ?ttm=true. Market multiples (P/E, EV/EBITDA, …) are omitted until the market-price source lands.

パラメーター
ticker 必須pathstringSecurities code without the trailing check digit, e.g. 7203 for Toyota. Values containing control characters (e.g. an embedded percent-encoded NUL) return 400; any other value that is not four ASCII digits or uppercase letters returns 404.
ttm querybooleanReturn trailing-twelve-month metrics instead of the latest period's: the latest ~12-month annual plus the next fiscal year's interim minus the same interim a year earlier, or the annual alone (labelled as itself) when that window cannot be formed. Values other than true/false return 400.
リクエスト例
curl https://hachiquant.com/api/v1/companies/7203/valuation
レスポンス
  • 200 The latest (or TTM) fundamental valuation snapshot.
  • 400 Malformed request (e.g. a non-numeric screener bound).
  • 404 No such company.
  • 429 Per-IP quota exceeded.

Screener

Rank the universe by fundamental metrics.

get /api/v1/screener
Screen the universe

Ranks companies by each company's latest annual values from the precomputed metrics. Filters: add <metric>_min and/or <metric>_max query parameters (e.g. roe_min=0.1, equity_ratio_max=0.8). A company must report every filtered metric to match. Valid metric keys: gross_margin, operating_margin, net_margin, roe, roa, revenue_growth, eps, eps_growth, current_ratio, equity_ratio, bvps, fcf. Non-numeric (or NaN) bounds and non-integer limit/offset return 400. An unrecognized sort key falls back to ticker order, and any order other than asc sorts descending.

パラメーター
roe_min querynumberExample lower bound. The same <metric>_min / <metric>_max pattern works for every metric key (see description).
roe_max querynumberExample upper bound.
sort querygross_margin | operating_margin | net_margin | roe | roa | revenue_growth | eps | eps_growth | current_ratio | equity_ratio | bvps | fcfMetric key to order by; omit to order by ticker.
order queryasc | descSort direction. Any value other than asc sorts descending.
limit queryintegerMaximum rows (default 50, max 200; larger values are capped). Non-integer values return 400.
offset queryintegerRows to skip. Non-integer values return 400.
リクエスト例
curl https://hachiquant.com/api/v1/screener
レスポンス
  • 200 A page of matching companies plus the total match count.
  • 400 Malformed request (e.g. a non-numeric screener bound).
  • 429 Per-IP quota exceeded.