Skip to main content

Python package for accessing Japanese corporate financial data from EDINET

Project description

edinet-tools

Python library for Japan's EDINET disclosure system — the official source for securities reports, shareholding notices, tender offers, and other regulatory filings from listed Japanese companies.

import edinet_tools

toyota = edinet_tools.entity("7203")
docs = toyota.documents(days=30)
report = docs[0].parse()  # → SecuritiesReport, LargeHoldingReport, etc.

Install

pip install edinet-tools

Requires Python 3.10+. No heavy dependencies — just pandas, python-dateutil, chardet, and python-dotenv.

Design

edinet-tools has three layers:

  1. API client — fetch document listings and download filings in any format (XBRL, PDF, HTML)
  2. Typed parsers — every EDINET document type routes to a named Python dataclass with structured fields
  3. Full capture — elements not yet mapped to typed fields are preserved in raw_fields, unmapped_fields, and text_blocks, so you can explore what's available and nothing is silently dropped

Each parser maps known XBRL elements to typed Python fields (dates, decimals, strings). As EDINET evolves or new elements become useful, adding a field is one line in the element map and one line on the dataclass. The architecture is designed to grow incrementally without breaking existing code.

EDINET Document Types

EDINET defines 42 document types spanning corporate disclosure, capital markets activity, and governance reporting. edinet-tools provides typed parsers for all of them.

Code Family Description
120, 130 Securities Reports Annual reports — financials, governance, business overview (J-GAAP + IFRS)
140, 150 Quarterly Reports Quarterly financials (abolished April 2024)
160, 170 Semi-Annual Reports Semi-annual reports, primarily investment funds
180, 190 Extraordinary Reports Material events — M&A, management changes, restructuring
220, 230 Treasury Stock Share buyback authorization and execution status
235, 236 Internal Control J-SOX evaluation results — internal control effectiveness
135, 136 Confirmation Documents CEO/CFO attestation (primarily PDF)
200, 210 Parent Company Reports Parent-subsidiary relationships
350, 360 Large Shareholding 5%+ ownership filings — filer, target, ownership percentage
370, 380 Shareholding Changes Position changes for large holders
240, 250 Tender Offer Registration Public tender offer filings
260 Tender Offer Withdrawal Withdrawal of tender offers
270, 280 Tender Offer Reports Tender offer completion — outcome, final holdings
290, 300 Statement of Opinion Target company's board opinion on a tender offer
310, 320 Response to Questions Regulatory Q&A during tender offer process
330, 340 Exemption Application Exemption from separate purchase prohibition
030, 040 Securities Registration New securities registration statements (primarily funds)
010, 020 Securities Notification Securities issuance notifications
050 Registration Withdrawal Withdrawal of securities registration
070, 080, 090 Shelf Registration Shelf registration for future bond/equity issuance
060 Issuance Notification Issuance registration notifications
100 Issuance Supplementary Supplementary shelf registration drawdown documents
110 Issuance Withdrawal Withdrawal of issuance registration

Amendments (even-numbered codes like 130, 150, 190) route to the same parser as their base type and set is_amendment = True.

from edinet_tools import supported_doc_types, doc_type

supported_doc_types()  # All 42 codes with typed parsers

dt = doc_type("235")
print(dt.name_en)  # "Internal Control Report"
print(dt.name_jp)  # "内部統制報告書"

Usage

Entity Lookup

import edinet_tools

toyota = edinet_tools.entity("7203")      # By ticker (digit or alphanumeric)
toyota = edinet_tools.entity("Toyota")    # By name search
toyota = edinet_tools.entity("E02144")    # By EDINET code
print(toyota.name, toyota.edinet_code)    # TOYOTA MOTOR CORPORATION E02144

# Look up by Japan Corporate Number (法人番号)
toyota = edinet_tools.entity_by_corporate_number("1180301018771")

# Name search handles full-width/half-width, gaiji (㈱), and middle-dot variants
mufg = edinet_tools.search("三菱UFJ銀行")  # matches the catalog's UFJ form too

banks = edinet_tools.search("bank", limit=5)

Fetching Documents

# All filings for a date (requires EDINET_API_KEY)
docs = edinet_tools.documents("2026-01-20")

# Filter by company and type
earnings = toyota.documents(doc_type="120", days=365)

Parsing

report = doc.parse()

# Securities Report — financials with J-GAAP and IFRS support
report.net_sales
report.operating_cash_flow
report.roe
report.accounting_standard  # "Japan GAAP" or "IFRS"

# Large Shareholding Report
report.filer_name
report.target_company
report.ownership_pct

# Tender Offer
report.acquirer_name
report.target_name
report.holding_ratio_after

# Any report
report.fields()     # List available typed fields
report.to_dict()    # Export as dictionary
report.raw_fields   # All XBRL elements by element ID
report.text_blocks  # Narrative text block content

Download Formats

from edinet_tools.api import fetch_document

csv_zip = fetch_document("S100ABC")            # XBRL CSV (default)
pdf = fetch_document("S100ABC", type=2)        # PDF
html_zip = fetch_document("S100ABC", type=1)   # HTML documents

Configuration

Get a free API key from EDINET (video walkthrough):

export EDINET_API_KEY=your_key_here

Or use a .env file. Entity lookup and parsing work without an API key — only document fetching requires one.

Testing

pytest tests/ -v  # 660+ tests

Links

License

MIT


Independent project. Not affiliated with Japan's Financial Services Agency. Verify data independently before making financial decisions.

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

edinet_tools-0.6.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

edinet_tools-0.6.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file edinet_tools-0.6.0.tar.gz.

File metadata

  • Download URL: edinet_tools-0.6.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for edinet_tools-0.6.0.tar.gz
Algorithm Hash digest
SHA256 783a7b09de5ffbc6ce17e2784ff7a09b2fe3fd79b37671d140a3e67c1427bf86
MD5 ca50f441f165ca8e2da0c1591f667fbd
BLAKE2b-256 48d8755464990ee0b431795f004041fc79dbb3d54544df7e8333c79bc422fb75

See more details on using hashes here.

File details

Details for the file edinet_tools-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: edinet_tools-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for edinet_tools-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2329e5fd507cd651bfef12b0b25e95229ffe75aaae8a7aecb9c4b82669c94e1f
MD5 9eec24b0e4dbd51fa9808112b5d0b9da
BLAKE2b-256 ce98ceed97599b68c7c7cbde7acceeb768d0196a7a1cd339a3925e41f58e91be

See more details on using hashes here.

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