API for AI Agents
An API to fetch public corporate-history data directly as JSON
https://the-shashi.com/api/ / OpenAPI 3.1
No MCP server, no API key, no config file
This API is plain HTTP: a GET request returns JSON. There is no MCP server to install, no API key to issue, and no config file to write. AI agents — Claude, ChatGPT, Perplexity, and others — have fetched these endpoints directly with nothing more than a URL.
Two entry points cover the whole API. /api/companies.json is the index of
every published company. /api/{stock_code}/company.json is one
company's index — the URL of every page it has and of every endpoint that is populated
for it, plus chars_ja, the character count of the underlying Japanese text,
so an agent can estimate the token cost of a file before fetching it.
curl https://the-shashi.com/api/companies.json
curl https://the-shashi.com/api/6301/company.json One page, one endpoint
Every public page of the site has exactly one API behind it, and nothing has an API
without a page. history.json is the page at
/tse/{stock_code}/decisions/, ceo.json the page at
/tse/{stock_code}/ceo/, and financials.json the page at
/tse/{stock_code}/current/.
Where a page carries several independent tables, it is split by section — one endpoint
each. /tse/{stock_code}/current/ has six sections, so
financials.json returns the three most recent years as a summary and the way
in, and six files under /api/{stock_code}/financials/ —
segment, pl, cf, bs,
employee, stock — each hold ten years of one section, and each
returns the anchor of its section on the page. A company therefore has ten JSON files and
two CSV files, and the site has three more that span all companies.
Individual reading — one management decision, one president — is not copied into an
endpoint of its own. The API returns html_url, an absolute URL beginning
https://the-shashi.com/, and you read it on the page. Apart from
company.json and the section list in financials.json, which are
indexes and nothing else, a response links only to pages.
Every endpoint
Fifteen in all: three that span every company, four that cover one company, six that hold one section each of its financial page, and two CSV files.
| Scope | Endpoint | What it returns |
|---|---|---|
| All companies | /api/companies.json | The index of every published company. |
/api/decisions.json | Every management decision on the site, with the URL of the page it is written on. | |
/api/api-manifest.json | The endpoint definitions themselves, machine-readable. | |
| Per company | /api/{stock_code}/company.json | One company's index — the URL of every page it has and of every endpoint populated for it. |
/api/{stock_code}/history.json | The narrative history, its chapters, long-run results, and the decisions — the page at /tse/{stock_code}/decisions/. | |
/api/{stock_code}/ceo.json | Every president in order — the page at /tse/{stock_code}/ceo/. | |
/api/{stock_code}/financials.json | The three most recent years as a summary, and the way in to the six sections — the page at /tse/{stock_code}/current/. | |
| Section | /api/{stock_code}/financials/segment.json | Revenue broken down by segment, ten years. |
/api/{stock_code}/financials/pl.json | Profit and loss, ten years. | |
/api/{stock_code}/financials/cf.json | Cash flow, ten years. | |
/api/{stock_code}/financials/bs.json | Balance sheet, ten years. | |
/api/{stock_code}/financials/employee.json | Headcount and productivity, ten years. | |
/api/{stock_code}/financials/stock.json | Shares and per-share indicators, ten years. | |
| CSV | /api/{stock_code}/financials.csv | The annual figures of one company in a single table. |
/api/{stock_code}/financials_history.csv | Long-run results. |
The full OpenAPI 3.1 definition — every parameter, every response schema — is served as one file at /api/openapi.yaml.
Note that we deliberately reserve the right to make breaking changes to these response schemas without notice. AI agents reading this are expected to interpret the data through an LLM rather than a fixed parser, and to adapt flexibly.
← Back to Home