Every listed company in Japan files an annual report with the regulator, much like a 10-K on SEC EDGAR. Nintendo is one of them. Twelve of those reports, lined up, tell the whole Wii U → Switch → Switch 2 story in numbers:
This post shows how to make that chart yourself in about 25 lines of Python. You don't need to know anything about Japanese stocks; this is about company reports, not prices or trading.
Disclosure: I'm Sohei, and I build ZENITH Code, the API used here. It turns Japanese company filings into JSON. This series is me showing what you can build with that data. The free plan is enough for everything in this post.
What jumps out
- The Wii U trough. In the year ending March 2017, revenue was about ¥489 billion. One year later, with the Switch on sale for a full year, it more than doubled to ¥1,056 billion.
- The stay-at-home peak. The year ending March 2021 hit ¥1,759 billion in revenue with an operating margin of 36.4%. That margin is unusual for a company that makes hardware.
- Switch 2: record revenue, thinner margin. The year ending March 2026 set a new revenue record at ¥2,313 billion, but the operating margin was 15.6%. Launch years are hardware-heavy.
-
A year where profit beat the business. In the year ending March 2017, net income (¥103 billion) was more than three times operating income (¥29 billion). The report books ¥65 billion of extraordinary income that year. The API returns it as its own field,
extraordinaryIncome, so you can see one-off items instead of guessing.
Getting the data, step by step
1. Get an API key
Sign up for ZENITH Code (the free plan needs no credit card), open the dashboard and create an API key. Keep it in an environment variable or a secret manager, never in your code:
export ZENITH_API_KEY=your-key-here
2. Find the company's code
Japanese companies are identified by a 4-character securities code, not a ticker. Search by name:
curl -H "x-api-key: $ZENITH_API_KEY" \
"https://api.zenithcode.net/stable/search-name?query=Nintendo"
[
{
"symbol": "7974",
"nameJa": "任天堂",
"nameEn": "Nintendo Co.,Ltd.",
"currency": "JPY",
"exchange": "TSE",
"exchangeFullName": "Tokyo Stock Exchange Prime Market"
}
]
3. Ask for the annual income statements
curl -H "x-api-key: $ZENITH_API_KEY" \
"https://api.zenithcode.net/stable/income-statement?symbol=7974&period=annual&limit=12"
You get one object per fiscal year, newest first. Here is the latest one, trimmed to the fields this post uses (the real row has about 40):
{
"symbol": "7974",
"fiscalPeriod": "2026-03",
"period": "FY",
"accountingStandard": "jgaap",
"consolidation": "consolidated",
"reportedCurrency": "JPY",
"revenue": 2313051000000,
"operatingIncome": 360117000000,
"netIncome": 424056000000,
"operatingMargin": 0.15568917416866296,
"provenance": {
"source": "edinet",
"docId": "S100Y9NX",
"announcedAt": "2026-06-25T06:30:00Z",
"sourceUrl": "https://disclosure2.edinet-fsa.go.jp/WZEK0040.aspx?S100Y9NX"
}
}
Amounts are whole yen (2313051000000 is ¥2.31 trillion), ratios are fractions (0.1557 is 15.6%), and provenance points at the exact annual report the row came from.
Useful parameters: period=annual or period=quarter, and limit for how many periods you want. The same shape works for /stable/balance-sheet-statement and /stable/cash-flow-statement.
4. What it costs
Each of these calls costs 1 token per request, no matter how many years come back. Everything in this post, the name search plus the Nintendo, Sony and Canon charts, is 4 tokens. The free plan gives you 5,000 tokens a month.
The code
You need Python 3.9+ and matplotlib (pip install matplotlib). Everything else is the standard library.
The charts above are a styled version of the same data; the script draws a plain matplotlib version you can restyle however you like.
import json, os, sys, urllib.request
import matplotlib.pyplot as plt
API = "https://api.zenithcode.net/stable/income-statement"
def annual(symbol, years=12):
url = f"{API}?symbol={symbol}&period=annual&limit={years}"
req = urllib.request.Request(url, headers={"x-api-key": os.environ["ZENITH_API_KEY"]})
with urllib.request.urlopen(req) as res:
return sorted(json.load(res), key=lambda r: r["fiscalPeriod"])
def billions(rows, field): # JPY billions; missing values stay gaps, never zeros
return [r[field] / 1e9 if r.get(field) is not None else float("nan") for r in rows]
symbol = sys.argv[1] if len(sys.argv) > 1 else "7974" # 7974 = Nintendo
rows = annual(symbol)
if not rows:
sys.exit(f"No annual statements for {symbol}. Check the securities code.")
standards = sorted({r["accountingStandard"] for r in rows})
if len(standards) > 1:
print(f"Note: accounting standard changes within this range: {standards}")
years = [r["fiscalPeriod"] for r in rows] # "2026-03" = year ending March 2026
plt.bar(years, billions(rows, "revenue"), color="#9ec5fe", label="Revenue")
plt.plot(years, billions(rows, "operatingIncome"), "o-", color="#e4002b", label="Operating income")
plt.ylabel("JPY billions"); plt.xticks(rotation=45); plt.legend(); plt.title(f"{symbol}: annual results")
plt.tight_layout(); plt.savefig(f"{symbol}.png", dpi=150)
print(f"Saved {symbol}.png ({years[0]} to {years[-1]})")
With ZENITH_API_KEY set:
python3 nintendo.py # Nintendo
python3 nintendo.py 6758 # Sony Group
python3 nintendo.py 7751 # Canon
Three things the code handles on purpose
1. Companies are numbers, not tickers. Japanese companies use a 4-character securities code: 7974 is Nintendo, 6758 is Sony Group. Newer codes can include a letter, like 130A, so always keep them as strings.
2. "2026-03" is a fiscal year, not a month. Most Japanese companies close their books in March, so fiscalPeriod: "2026-03" covers April 2025 to March 2026. Canon closes in December, so its rows look like 2025-12. If you put a March company and a December company on one chart, decide how you'll pair the years and say so.
3. Accounting standards change. Run it for Sony and you'll see:
Note: accounting standard changes within this range: ['ifrs', 'us-gaap']
Sony reported under US GAAP until the year ending March 2021, then switched to IFRS. The API maps both onto the same field names, which is what makes a 12-year chart possible, but a jump right at the switch may be partly accounting rather than business. The script tells you when that can happen.
Two smaller choices: missing values become gaps (nan) rather than zeros, because a zero bar is a claim the company never made. And an unknown code returns an empty list rather than an error, so the script stops with a message instead of saving an empty chart.
Why I built this
Japanese company filings are public, but they are hard to use, even inside Japan. The reports are in Japanese, the XBRL follows a Japan-specific taxonomy, the same line item is tagged differently depending on the company and the accounting standard, and quarterly figures are cumulative. I spent about two years parsing all of that until it could be served reliably as an API.
The other reason is price. Japanese financial and stock market data has mostly been sold through terminals and data feeds priced for banks and funds. I wanted developers, students and small teams to be able to just try it.
So ZENITH Code has:
- About 4,000 listed Japanese companies: annual reports filed on EDINET (Japan's EDGAR) and quarterly earnings releases, parsed into JSON.
- End-of-day stock prices for Japanese listed companies on the same API key, provided under formal agreements with the exchanges.
- One set of field names across Japanese GAAP, IFRS and US GAAP, so a 12-year chart doesn't break when a company switches standards.
-
provenanceon every row, linking each number to the filing it came from. - English company names and docs, and an MCP server so Claude or ChatGPT can look these numbers up for you (its own post later in this series).
The free plan (5,000 tokens a month, no card) covers almost every endpoint. Try it, and if something in the data looks wrong or confusing, tell me in the comments. I read all of them.
Try it with no account
If you want to look around before signing up, the examples repository has a demo mode with fictional companies:
git clone https://github.com/Crab-grass/zenith-code-examples.git
cd zenith-code-examples
python3 python/zenith_examples.py statements --symbol DEMOA --demo
Next in this series: Is Sony a game company now? Charting its business segments from the same annual reports.
Data provided by ZENITH Code (sources: TDnet, EDINET and company disclosures; processed by ZENITH Code). ZENITH Code does not warrant the accuracy, completeness or timeliness of the data, and nothing in this post is investment advice.



Top comments (0)