API for AI Agents

An API to fetch public corporate-history data directly as JSON

https://the-shashi.com/api/ / OpenAPI 3.1

OpenAPI definition

The full set of endpoints and response schemas is summarized below.

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.

openapi: 3.1.0
info:
  title: The社史 Public Data API
  version: "3.0"
  description: >-
    Public data for The社史 is published as static JSON files that AI agents can fetch
    directly with GET. No authentication is required, and the API is free to call as many
    times as you like — it runs on infrastructure built to handle heavy load.
servers:
  - url: https://the-shashi.com
paths:
  /api/companies.json:
    get:
      summary: Public entry point — company index + endpoint catalog
      responses:
        "200":
          description: |
            The first endpoint an LLM or external client should call. Returns the public endpoint catalog (endpoints)
            and a minimal index of every published company (contents: stock_code / name / industry / updated) in a single request.
            Follow /api/{stock_code}/manifest.json for the details of each company.
          content:
            application/json:
              schema:
                type: object
                properties:
                  version: { type: string, example: "3" }
                  base: { type: string, example: "https://the-shashi.com" }
                  endpoints:
                    type: array
                    items:
                      type: object
                      properties:
                        id: { type: string }
                        method: { type: string, example: "GET" }
                        path: { type: string }
                        label: { type: string }
                        description: { type: string }
                        format: { type: string, enum: ["json", "csv"] }
                        scope: { type: string, enum: ["global", "company"] }
                      additionalProperties: false
                  contents:
                    type: array
                    items:
                      type: object
                      properties:
                        stock_code: { type: string, example: "1332" }
                        name: { type: string }
                        name_en: { type: string }
                        industry: { type: string, nullable: true }
                        industry_detail: { type: string, nullable: true }
                      additionalProperties: false
                additionalProperties: false

  /api/{stock_code}/manifest.json:
    get:
      summary: Resource catalog + profile
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "7203" }
      responses:
        "200":
          description: Company profile (name / industry / listing date / color, etc.) and resource catalog
          content:
            application/json:
              schema:
                type: object
                properties:
                  version: { type: string, example: "3" }
                  stock_code: { type: string }
                  company_name: { type: string }
                  profile:
                    type: object
                    properties:
                      company_color: { type: string }
                      industry: { type: string }
                      published: { type: string, format: date }
                      updated: { type: string, format: date }
                      found:
                        type: object
                        properties:
                          year: { type: integer }
                          location: { type: string }
                          founder: { type: string }
                      listing:
                        type: object
                        properties:
                          listed_year: { type: integer, nullable: true }
                          delisted_year: { type: integer, nullable: true }
                          unlisted: { type: boolean }
                      old_name: { type: string }
                      name_kana: { type: string }
                      old_name_kana: { type: string }
                  resources:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        is_active: { type: boolean }
                        url: { type: string }
                        format: { type: string }
                        description: { type: string }
                        chars_ja: { type: integer }

  /api/{stock_code}/history.json:
    get:
      summary: History overview
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "7203" }
      responses:
        "200":
          description: Chaptered history essay + summary + author's notes + recent trends and outlook + sources & quotes
          content:
            application/json:
              schema:
                type: object
                properties:
                  title: { type: string }
                  sections:
                    type: array
                    items: { type: object, additionalProperties: true }
                  summary:
                    type: object
                    properties:
                      title: { type: string }
                      text: { type: string }
                      sections:
                        type: array
                        items: { type: object, additionalProperties: true }
                  quotes: { type: array, items: { type: object, additionalProperties: true } }
                additionalProperties: true

  /api/{stock_code}/timeline.json:
    get:
      summary: Corporate chronology
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "7203" }
      responses:
        "200":
          description: Chronology timeline + management-decision cards
          content:
            application/json:
              schema:
                type: object
                properties:
                  timeline: { type: array, items: { type: object, additionalProperties: true } }
                additionalProperties: true

  /api/decisions.json:
    get:
      summary: Cross-company index of management decisions
      responses:
        "200":
          description: |
            Index of every published management decision across all companies, with facet counts for
            type / tags / regions / decade. Holds no body text — filter here, then follow api_url
            to /api/{stock_code}/decisions.json for the full dossier including quoted primary sources.
          content:
            application/json:
              schema:
                type: object
                properties:
                  version: { type: string, example: "3" }
                  base: { type: string, example: "https://the-shashi.com" }
                  description: { type: string }
                  count: { type: integer, example: 1502 }
                  company_count: { type: integer, example: 418 }
                  facets:
                    type: object
                    properties:
                      types:   { type: array, items: { type: object, properties: { key: { type: string }, count: { type: integer } } } }
                      tags:    { type: array, items: { type: object, properties: { key: { type: string }, count: { type: integer } } } }
                      regions: { type: array, items: { type: object, properties: { key: { type: string }, count: { type: integer } } } }
                      decades: { type: array, items: { type: object, properties: { key: { type: string, example: "1980s" }, count: { type: integer } } } }
                  decisions:
                    type: array
                    items:
                      type: object
                      properties:
                        code:         { type: string, example: "4716" }
                        company_name: { type: string }
                        industry:     { type: string }
                        slug:         { type: string, example: "nihon-oracle-listing-1999" }
                        decision_id:  { type: string }
                        year:         { type: integer, nullable: true }
                        month:        { type: integer, nullable: true }
                        title:        { type: string }
                        subtitle:     { type: string }
                        type:         { type: string, example: "capital" }
                        tags:         { type: array, items: { type: string } }
                        regions:      { type: array, items: { type: string } }
                        status:       { type: string, example: "implemented" }
                        status_label: { type: string }
                        decider:      { type: string }
                        summary:      { type: string }
                        url:          { type: string, example: "/tse/4716/decisions/nihon-oracle-listing-1999/" }
                        api_url:      { type: string, example: "/api/4716/decisions.json" }
                        last_updated: { type: string, format: date }
                additionalProperties: true

  /api/{stock_code}/decisions.json:
    get:
      summary: Management decisions (full dossiers)
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "4716" }
      responses:
        "200":
          description: |
            Every management decision recorded for this company, in full. Each entry carries the
            structured header (type / tags / status / parties / dates / snapshot), a chaptered
            narrative under report (background → the decision → outcome), and evidences quoting the
            primary source verbatim with its citation. Ordered oldest first.
          content:
            application/json:
              schema:
                type: object
                properties:
                  stock_code: { type: string }
                  count: { type: integer }
                  decisions:
                    type: array
                    items:
                      type: object
                      properties:
                        slug:         { type: string }
                        url:          { type: string }
                        year:         { type: integer, nullable: true }
                        month:        { type: integer, nullable: true }
                        decision_id:  { type: string }
                        type:         { type: string }
                        tags:         { type: array, items: { type: string } }
                        regions:      { type: array, items: { type: string } }
                        title:        { type: string }
                        subtitle:     { type: string }
                        status:       { type: string }
                        status_label: { type: string }
                        issue:        { type: string }
                        decider:      { type: string }
                        highlights:   { type: array, items: { type: object, additionalProperties: true } }
                        parties:      { type: array, items: { type: object, additionalProperties: true } }
                        dates:        { type: object, additionalProperties: true }
                        breakdown:    { type: object, additionalProperties: true }
                        timeline:     { type: array, items: { type: object, additionalProperties: true } }
                        snapshot:     { type: object, additionalProperties: true }
                        report:
                          type: array
                          description: Chaptered narrative. Each section has subsections[].paragraphs[], and each paragraph may carry evidences[] quoting the source verbatim.
                          items: { type: object, additionalProperties: true }
                        references:   { type: array, items: { type: string } }
                        last_updated: { type: string, format: date }
                      additionalProperties: true
                additionalProperties: true

  /api/{stock_code}/executives.json:
    get:
      summary: Executives
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "7203" }
      responses:
        "200":
          description: Full executive data (career, expertise, compensation) + past leaders
          content:
            application/json:
              schema:
                type: object
                properties:
                  executives: { type: array, items: { type: object, additionalProperties: true } }
                  careers: { type: array, items: { type: object, additionalProperties: true } }
                  officer: { type: array, items: { type: object, additionalProperties: true } }
                  ceo_history: { type: array, items: { type: object, additionalProperties: true } }
                additionalProperties: true

  /api/{stock_code}/shareholders.json:
    get:
      summary: Major shareholders
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "7203" }
      responses:
        "200":
          description: Major-shareholder data (by FY × rank, including long-term holders)
          content:
            application/json:
              schema:
                type: object
                properties:
                  commentary: { type: string }
                  long_term_commentary: { type: array, items: { type: string } }
                  shareholders: { type: array, items: { type: object, additionalProperties: true } }
                  categories: { type: array, items: { type: object, additionalProperties: true } }
                  long_term: { type: array, items: { type: object, additionalProperties: true } }
                additionalProperties: true

  /api/{stock_code}/financials.json:
    get:
      summary: Financial statements
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "7203" }
      responses:
        "200":
          description: Pure PL/BS/CF from FY01 onward
          content:
            application/json:
              schema:
                type: object
                properties:
                  commentary: { type: string }
                  financials: { type: array, items: { type: object, additionalProperties: true } }
                  cf: { type: array, items: { type: object, additionalProperties: true } }
                  bs: { type: array, items: { type: object, additionalProperties: true } }
                  pl_detail: { type: array, items: { type: object, additionalProperties: true } }
                  bs_detail: { type: array, items: { type: object, additionalProperties: true } }
                additionalProperties: true

  /api/{stock_code}/financials-longterm.json:
    get:
      summary: Long-term performance
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "7203" }
      responses:
        "200":
          description: Long-term performance time series from founding to present (sales, profit, employees)
          content:
            application/json:
              schema:
                type: object
                properties:
                  history: { type: array, items: { type: object, additionalProperties: true } }
                additionalProperties: true

  /api/{stock_code}/segments.json:
    get:
      summary: Business segments
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "7203" }
      responses:
        "200":
          description: Financial data by business segment
          content:
            application/json:
              schema:
                type: object
                properties:
                  segment: { type: array, items: { type: object, additionalProperties: true } }

  /api/{stock_code}/regions.json:
    get:
      summary: Sales by region
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "7203" }
      responses:
        "200":
          description: Sales by region
          content:
            application/json:
              schema:
                type: object
                properties:
                  region: { type: array, items: { type: object, additionalProperties: true } }

  /api/{stock_code}/workforce.json:
    get:
      summary: Workforce
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "7203" }
      responses:
        "200":
          description: Workforce data (headcount, average salary, average age)
          content:
            application/json:
              schema:
                type: object
                properties:
                  employee: { type: array, items: { type: object, additionalProperties: true } }

  /api/{stock_code}/financials.csv:
    get:
      summary: Financials CSV
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "7203" }
      responses:
        "200":
          description: CSV download of the financial statements (PL/BS/CF)
          content:
            text/csv:
              schema: { type: string, format: binary }

  /api/{stock_code}/financials_history.csv:
    get:
      summary: Long-term performance CSV
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "7203" }
      responses:
        "200":
          description: CSV download of the long-term performance time series from founding to present
          content:
            text/csv:
              schema: { type: string, format: binary }

  /api/{stock_code}/segments.csv:
    get:
      summary: Segments CSV
      parameters:
        - in: path
          name: stock_code
          required: true
          schema: { type: string, example: "7203" }
      responses:
        "200":
          description: CSV download of financial data by business segment
          content:
            text/csv:
              schema: { type: string, format: binary }
← Back to Home