Recruiting decks, HR policy reviews and integrated reports all call for the same chore: opening competitors' annual securities reports and copying out headcount, average salary and the share of women in management. Human capital figures change meaning with two questions, "parent-only or consolidated?" and "calculated on which basis?" When only the copied table reaches the meeting, those assumptions get lost.
The script on this page pulls competitors' human capital disclosures through an API and builds one table with the assumptions kept as columns. The examples use figures for the fiscal year ended March 2026 for Toyota Motor (7203) and five other automakers, retrieved from ZENITH Code on October 29, 2026.
What you will get from this page
- How to combine two endpoints into one row per company from the "employees" section of the annual securities report
- Why average age, tenure and salary describe parent-company employees only, and how that misleads for holding companies
- How to keep the calculation basis of the male parental leave rate in the table as text
- Table habits that matter: never turning undisclosed into zero, and dating filings in Japan time
Where the numbers come from
The figures come from the "employees" section (従業員の状況) of each company's annual securities report (yuho). For fiscal years ending on or after March 31, 2023, Japanese listed companies must include human capital and diversity information in that report, including the ratio of women in management, the rate of male employees taking childcare leave and the gender wage ratio.
ZENITH Code exposes this through two endpoints, each costing one token per call: two tokens per company, 12 for six companies.
| Endpoint | Main fields |
|---|---|
/workforce |
Parent-company headcount, average age, average tenure and average annual salary; consolidated headcount; headcount by segment |
/diversity |
Women in management, male childcare leave rate and its basis, gender wage ratio (all, regular and part-time or fixed-term employees), for the reporting company and major consolidated subsidiaries |
Build one row per company
import csv, json, os, urllib.parse, urllib.request
from datetime import datetime, timedelta, timezone
from urllib.error import HTTPError
BASE = "https://api.zenithcode.net/stable"
API_KEY = os.environ.get("ZENITH_API_KEY", "YOUR_API_KEY")
JST = timezone(timedelta(hours=9))
WORKFORCE_KEEP = ("fiscalPeriod", "docId", "submittedAt", "employees", "consolidatedEmployees",
"averageAge", "averageTenureYears", "averageAnnualSalary")
DIVERSITY_KEEP = ("femaleManagerRatio", "maleChildcareLeaveRatio", "maleChildcareLeaveBasis",
"wageGapAll", "wageGapRegular", "wageGapNonRegular")
BASIS = {"childcare-leave": "childcare leave only",
"childcare-leave-and-purpose-leave": "incl. childcare-purpose leave"}
def get(path, **params):
url = f"{BASE}{path}?{urllib.parse.urlencode(params)}"
req = urllib.request.Request(url, headers={"x-api-key": API_KEY})
with urllib.request.urlopen(req, timeout=30) as res:
return json.load(res)
def latest_fy(path, symbol):
"""The latest full-year (FY) record. None on 404, when there is no annual report."""
try:
data = get(path, symbol=symbol)
except HTTPError as e:
if e.code == 404:
return None
raise
rows = [r for r in (data if isinstance(data, list) else [data])
if r.get("symbol") == symbol and r.get("period") == "FY"]
return max(rows, key=lambda r: r["fiscalPeriod"], default=None)
def jst_date(iso):
if not iso:
return None
return datetime.fromisoformat(iso.replace("Z", "+00:00")).astimezone(JST).date().isoformat()
Matching symbol exactly catches a row for another company slipping in. Next, combine the two responses into one row.
def num(v):
return v if isinstance(v, (int, float)) and not isinstance(v, bool) else None
def people_row(symbol):
w = latest_fy("/workforce", symbol)
d = latest_fy("/diversity", symbol)
row = {"symbol": symbol}
if w:
row.update({k: w.get(k) for k in WORKFORCE_KEEP})
row["filedJst"] = jst_date(w.get("submittedAt"))
for k in WORKFORCE_KEEP[3:]:
row[k] = num(row[k]) # non-numbers become None, never zero
# The table compares reporting companies (parent-only); subsidiary values are not used
company = (d or {}).get("reportingCompany") or {}
for k in DIVERSITY_KEEP:
row[k] = company.get(k) if k == "maleChildcareLeaveBasis" else num(company.get(k))
row["diversityPeriod"] = d and d["fiscalPeriod"]
row["leaveBasisLabel"] = (BASIS.get(row["maleChildcareLeaveBasis"], "basis unknown")
if row["maleChildcareLeaveRatio"] is not None else "")
emp, cons = row.get("employees"), row.get("consolidatedEmployees")
row["parentShare"] = emp / cons if emp and cons else None
return row
Four decisions are built in.
- Use reporting-company values only for diversity.
/diversityalso returns figures per subsidiary, but a company-to-company table compares reporting companies with each other. - Spell out the basis. Next to the male childcare leave rate, a column says whether it counts childcare leave only or also childcare-purpose leave. A footnote symbol alone gets missed once the table is pasted into a deck.
- Date filings in Japan time.
submittedAtis UTC, so convert before taking the date. - Show parent-only headcount as a share of consolidated. A small
parentSharecan signal a holding company (see below).
Write the CSV
COLS = ["symbol", "fiscalPeriod", "filedJst", "docId", "employees", "consolidatedEmployees",
"parentShare", "averageAge", "averageTenureYears", "averageAnnualSalary",
"femaleManagerRatio", "maleChildcareLeaveRatio", "leaveBasisLabel",
"wageGapAll", "wageGapRegular", "wageGapNonRegular", "diversityPeriod"]
def run(symbols, path="human-capital.csv"):
with open(path, "w", newline="", encoding="utf-8-sig") as f:
w = csv.DictWriter(f, fieldnames=COLS, extrasaction="ignore")
w.writeheader()
for s in symbols: # one company at a time
w.writerow(people_row(s))
run(["7203", "7267", "7269", "7270", "7261", "7201"])
Headcounts are in people, salaries in yen and ratios stay as 0–1 decimals. Missing values are blank. When you average or rank in a spreadsheet, leave blank companies out of the denominator.
Sample output: six automakers, fiscal year ended March 2026
First, the employee figures. Average salary is rounded to ¥ millions here; the CSV holds yen (Toyota: 10,060,464).
| Company | Employees (parent) | Employees (consolidated) | Average age | Average tenure (years) | Average salary (¥ million) | Filed |
|---|---|---|---|---|---|---|
| Toyota Motor | 73,133 | 390,927 | 40.5 | 15.1 | 10.06 | 2026-06-10 |
| Honda Motor | 32,547 | 195,109 | 43.9 | 21.0 | 9.33 | 2026-06-18 |
| Suzuki Motor | 17,871 | 76,889 | 41.5 | 18.5 | 8.28 | 2026-08-25 |
| Subaru | 17,948 | 37,542 | 40.0 | 15.7 | 7.64 | 2026-06-22 |
| Mazda Motor | 22,857 | 47,144 | 42.5 | 17.7 | 7.11 | 2026-06-23 |
| Nissan Motor | 23,174 | 120,079 | 40.9 | 14.9 | 8.57 | 2026-06-22 |
Next, the diversity indicators.
| Company | Women in management | Male childcare leave rate | Basis | Gender wage ratio (all employees) |
|---|---|---|---|---|
| Toyota Motor | 3.9% | 79.0% | leave only | 67.0% |
| Honda Motor | 3.6% | 116.8% | incl. purpose leave | 72.8% |
| Suzuki Motor | 2.2% | 73.2% | leave only | 66.0% |
| Subaru | 4.3% | 82.6% | leave only | 78.0% |
| Mazda Motor | 5.8% | 67.1% | incl. purpose leave | 84.1% |
| Nissan Motor | 11.3% | 75.5% | leave only | 84.7% |
In the CSV, Honda's male childcare leave rate is 1.168; on screen it is 116.8%.
The filing-date column shows that although all six cover the fiscal year ended March 2026, Suzuki filed on August 25 and the other five in June. Depending on when you fetched, Suzuki's row in a "fiscal 2026" table could still have held the previous year's figures.
Reading the numbers correctly
Average salary, age and tenure are parent-only
Average age, tenure and annual salary in /workforce describe employees of the company that filed the report (the reporting company). They are not consolidated averages and exclude staff at overseas subsidiaries. Toyota's average salary of ¥10.06 million covers its 73,133 parent-company employees, not the 390,927 in the group.
A holding company's "average salary" describes head-office staff
The gap between parent-only and consolidated is widest at holding companies. For Fast Retailing's fiscal year ended August 2025, the parent had 1,572 employees against 59,522 consolidated, a parentShare of 0.026. Its average salary of ¥12.51 million, average age of 38.4 and average tenure of 5.8 years describe those 1,572 holding-company employees, not people working in stores or operating companies. Whether a competitor is a holding company or an operating company changes what the "average salary" column means.
At holding companies, average age and similar fields can be empty. The API does not fill them with values borrowed from another group company's table.
When average salary is empty
Average annual salary comes from the annual report's XBRL data. When a filing lacks it, the API converts the table value to yen and returns null if the result falls outside ¥1 million to ¥100 million. That rule keeps a misread unit from showing up as a number.
No annual securities report means 404
/workforce and /diversity return 404 for companies without an annual securities report, such as very recent listings, ETFs and REITs. /employee-count, which returns headcount only, answers the same companies with 200 and employeeCount: null, so handle the two differently if you combine them. A company that files in the foreign-company format (only 9399 among currently listed companies) has no employees section, so no workforce data exists.
Consolidated headcount can be null
consolidatedEmployees is null for companies without consolidated subsidiaries. It does not mean zero.
Check the subtotal flag before summing segment headcounts
segments in /workforce gives consolidated headcount by segment. In a two-level table, the upper-level row (for example 8051's 消費財関連事業, with 住建事業 and 家庭機器事業 beneath it) appears with isSubtotal: true; leave it out when summing. Parent-only breakdowns are in parentSegments, which is empty for some filings.
Toyota's fiscal year ended March 2026 looked like this.
| Segment | Consolidated | Parent |
|---|---|---|
| Automotive | 343,952 | 66,018 |
| Financial services | 16,222 | — |
| All other | 23,934 | 307 |
| Corporate (shared) | 6,819 | 6,808 |
The dash for parent-only financial services means the parent's breakdown has no such segment, not zero people. Segment sums can also differ from the reporting company's headcount. Daiwa Securities Group (8601) reports 624 employees, while its segment table covers career-track staff only, 494 people. Both match the filing.
The male childcare leave rate can exceed 100%
Japanese law allows two ways to publish the male childcare leave rate. One counts men who took childcare leave; the other also counts men who took leave for childcare purposes. In both, the denominator is men whose spouses gave birth during the year. The numerator includes men taking leave for children born the previous year, so the rate can exceed 100%.
The API returns the basis in maleChildcareLeaveBasis (childcare-leave or childcare-leave-and-purpose-leave, null when unknown). Rates on different bases are not measured with the same yardstick. When you rank companies, compare only those on the same basis. Some companies, such as Kao for the fiscal year ended December 2025, report a rate (90.1%) with a null basis. Do not compare a rate of unknown basis with either group.
The gender wage ratio is women's pay divided by men's
The gender wage ratio sets men's pay at 1 and shows women's pay as a fraction: 0.67 means women earn 67% of what men earn. It is not adjusted for differences in job type, rank or tenure. There are three categories: all employees, regular employees and part-time or fixed-term employees. Toyota's were 67.0%, 66.8% and 59.7%. Some subsidiaries' part-time categories show women earning more, above 1, as stated in the filings.
Each company defines "management"
Which ranks count as managerial is set by each company's own grading system. When the ratios differ widely, check the definition in each annual report.
Indicators outside the disclosure requirement may be absent
Companies that fall outside the legal disclosure requirement for an indicator, for example because of headcount, may not report it. Those cells are blank, not 0%.
Adapting it to your company
- Human capital figures change once a year, with the annual report. Refreshing when competitors' reports are all in (June through August for March year-ends) is enough.
- For a group-wide view, put
subsidiariesfrom/diversityin a separate table. Do not mix it into the company-to-company comparison. - For a version with screens, see the people table in the peer benchmark template and the people view in the company deep-dive template. Their saved demos open without an API key.
Related
- API docs: workforce, diversity, employee count
- Related articles: Build a peer benchmarking table, Compare competitors' segment revenue and profit
- Templates: zenith-code-examples
- Data display rights
An illustrated series on the same material is on Qiita (in Japanese).
This page explains how to handle financial and disclosure data. It is not a recommendation to buy or sell any security.