CarGene Sales API

The sales API from CarGene — 2 operation(s) for sales.

GitHub OpenAPI

Operations 2

GET /api/sales-figures Get Sales Figures #
GET /api/sales-regions Get Sales Regions #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/car-gene-com:car-gene-com-sales-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

car-gene-com-sales-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Car Gene Com Sales API
  version: 1.0.0
  description: 'Operations tagged sales across 2 of this provider''s published API definitions: car-gene-com-openapi.json, car-gene-com-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.car-gene.com
  description: CarGene API host (named on https://car-gene.com/mcp/; spec served at https://api.car-gene.com/openapi.json)
tags:
- name: Sales
paths:
  /api/sales-figures:
    get:
      tags:
      - Sales
      summary: Get Sales Figures
      description: '台数の全件と、足してよい単位ごとの集計を取得


        **空配列は「台数を調べていない」で、「0 台」ではない。**


        集計は metric と期間の型ごとに分かれる。合計には、何世代分・何地域分を

        足したかが入っている——**合計だけを全体の数として出さない** (#304)。


        `lang` を付けると、範囲を持つのに範囲の訳が無い行は落ち (**範囲を外して

        載せない**)、その行を含む枡と合計も枡ごと・合計ごと落ちる。**残る枡と合計の

        数は日本語の応答と同じ** (枡は日本語と同じ全行で組む)。世代の名前は訳 (無ければ

        null)、語は英語。出典の語と逐語は出典の文なので日本語のまま。'
      operationId: get_sales_figures_api_sales_figures_get
      parameters:
      - description: シリーズIDでフィルタ
        required: false
        schema:
          type: string
          title: Series Id
          description: シリーズIDでフィルタ
        name: series_id
        in: query
      - description: 世代IDでフィルタ
        required: false
        schema:
          type: string
          title: Model Id
          description: 世代IDでフィルタ
        name: model_id
        in: query
      - description: 訳を返す言語。省略すると日本語
        required: false
        schema:
          allOf:
          - $ref: '#/components/schemas/Lang'
          description: 訳を返す言語。省略すると日本語
        name: lang
        in: query
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSalesFiguresResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/sales-regions:
    get:
      tags:
      - Sales
      summary: Get Sales Regions
      description: '円を置く場所のマスタ一覧


        名前も座標もここにしか無い。**worldwide の行は座標を持たない**ので、

        地図に描くかどうかは座標の有無ではなく kind で判定する。'
      operationId: get_sales_regions_api_sales_regions_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSalesRegionsResponse'
components:
  schemas:
    GetSalesRegionsResponse:
      properties:
        regions:
          items:
            $ref: '#/components/schemas/SalesRegionResponse'
          type: array
          title: Regions
      type: object
      required:
      - regions
      title: GetSalesRegionsResponse
    SalesPeriodResponse:
      properties:
        kind:
          type: string
          title: Kind
        year:
          type: integer
          title: Year
        end_month:
          type: integer
          title: End Month
        half:
          type: integer
          title: Half
      type: object
      required:
      - kind
      - year
      title: SalesPeriodResponse
      description: '出典が書いている期間


        **年だけでは足せるかどうかが決まらない。** N-BOX には「2015年6月までの累計

        73万5,942台」と「2015年 18万4,920台」が両方あり、どちらも 2015 年。

        kind が違う行は足さない。'
    SalesRegionTotalResponse:
      properties:
        series_id:
          type: string
          title: Series Id
        model_id:
          type: string
          title: Model Id
        model_name:
          type: string
          title: Model Name
        region_code:
          type: string
          title: Region Code
        metric:
          type: string
          title: Metric
        metric_label:
          type: string
          title: Metric Label
        units:
          type: integer
          title: Units
        years:
          items:
            type: integer
          type: array
          title: Years
        expected_years:
          items:
            type: integer
          type: array
          title: Expected Years
        complete:
          type: boolean
          title: Complete
        conflicts:
          type: integer
          title: Conflicts
        source_terms:
          items:
            type: string
          type: array
          title: Source Terms
        scope_notes:
          items:
            type: string
          type: array
          title: Scope Notes
      type: object
      required:
      - series_id
      - metric
      - metric_label
      - units
      - years
      - expected_years
      - complete
      - conflicts
      - source_terms
      - scope_notes
      title: SalesRegionTotalResponse
      description: '1つの地域の枡を、年で足した数


        **足すのは年だけ** (docs/sales-grid.md「足さないもの」)。地域を跨いだ合計は

        どこにも作らない——親と子 (`US` ⊂ `NA`) が並ぶことがあり、足すとどの出典も

        言っていない数になる。


        **complete が「通算」と「掲載 N 年分」を分ける。** 対象期間 (シリーズなら

        売られていた全年、世代ならその世代がその地域で売られていた年) が全部

        埋まっていれば通算、欠けていれば掲載 N 年分。'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SalesFigureResponse:
      properties:
        id:
          type: string
          title: Id
        series_id:
          type: string
          title: Series Id
        model_id:
          type: string
          title: Model Id
        model_name:
          type: string
          title: Model Name
        region_code:
          type: string
          title: Region Code
        metric:
          type: string
          title: Metric
        source_term:
          type: string
          title: Source Term
        units:
          type: integer
          title: Units
        period:
          $ref: '#/components/schemas/SalesPeriodResponse'
        scope_note:
          type: string
          title: Scope Note
        source_url:
          type: string
          title: Source Url
        source_excerpt:
          type: string
          title: Source Excerpt
      type: object
      required:
      - id
      - series_id
      - metric
      - source_term
      - units
      - period
      - source_url
      - source_excerpt
      title: SalesFigureResponse
      description: '出典に書いてある台数、1行


        `source_term` は出典が使っている語そのまま、`metric` は集計キー。**画面に出る

        語は枡の `metric_label` で、`source_term` は出さない**(docs/sales-grid.md

        「見せ方」)——1つの円・1つの列が複数の出典を束ねるので、出典の語を並べると

        「販売台数・sales」のように読めない語になる。`source_term` は DB と検算で使う。'
    SalesRegionResponse:
      properties:
        code:
          type: string
          title: Code
        name_ja:
          type: string
          title: Name Ja
        name_en:
          type: string
          title: Name En
        kind:
          type: string
          title: Kind
        parent_code:
          type: string
          title: Parent Code
        latitude:
          type: number
          title: Latitude
        longitude:
          type: number
          title: Longitude
      type: object
      required:
      - code
      - name_ja
      - name_en
      - kind
      title: SalesRegionResponse
      description: '円を置く場所のマスタ


        名前も座標もここにしか無い。画面がコードから組み立てると、地域を足すたびに

        frontend も直すことになる (engineer_roles と同じ)。


        **worldwide の行だけ緯度経度が NULL。** 地図に描くかどうかは座標の有無では

        なく kind で判定する (NULL を「座標がまだ入っていない国」と読み違えない)。'
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    SalesCoverageResponse:
      properties:
        id:
          type: string
          title: Id
        series_id:
          type: string
          title: Series Id
        region_code:
          type: string
          title: Region Code
        year_from:
          type: integer
          title: Year From
        year_to:
          type: integer
          title: Year To
        result:
          type: string
          title: Result
        result_label:
          type: string
          title: Result Label
        checked_source_url:
          type: string
          title: Checked Source Url
        checked_at:
          type: string
          format: date
          title: Checked At
      type: object
      required:
      - id
      - series_id
      - region_code
      - year_from
      - year_to
      - result
      - result_label
      - checked_source_url
      title: SalesCoverageResponse
      description: '調べたが、その出典には無かった枡


        **行が無い = 未調査、行がある = 調べた結果の空欄。** 画面はこの行から

        「公表なし」「圏外」「集計対象外」の語を選ぶ

        (docs/sales-grid.md「空欄には状態がある」)。


        **`note` は返さない。** 調べた側の申し送りで、読者には出さない (#948)'
    SalesLifetimeResponse:
      properties:
        figure_id:
          type: string
          title: Figure Id
        series_id:
          type: string
          title: Series Id
        model_id:
          type: string
          title: Model Id
        model_name:
          type: string
          title: Model Name
        region_code:
          type: string
          title: Region Code
        metric:
          type: string
          title: Metric
        metric_label:
          type: string
          title: Metric Label
        source_term:
          type: string
          title: Source Term
        units:
          type: integer
          title: Units
        period:
          $ref: '#/components/schemas/SalesPeriodResponse'
        scope_note:
          type: string
          title: Scope Note
        source_url:
          type: string
          title: Source Url
      type: object
      required:
      - figure_id
      - series_id
      - metric
      - metric_label
      - source_term
      - units
      - period
      - source_url
      title: SalesLifetimeResponse
      description: '世代の通算 (model_lifetime) と、時点までの累計 (cumulative)


        **枡と別系統で、足し合わせない** (docs/sales-grid.md)。出典の語のまま文として

        出すためだけに、行をそのまま渡す。'
    SalesCellResponse:
      properties:
        series_id:
          type: string
          title: Series Id
        region_code:
          type: string
          title: Region Code
        year:
          type: integer
          title: Year
        metric:
          type: string
          title: Metric
        metric_label:
          type: string
          title: Metric Label
        units:
          type: integer
          title: Units
        sources:
          type: integer
          title: Sources
        conflict:
          type: boolean
          title: Conflict
        model_id:
          type: string
          title: Model Id
        model_name:
          type: string
          title: Model Name
        attribution:
          type: string
          title: Attribution
        deferred_model_ids:
          items:
            type: string
          type: array
          title: Deferred Model Ids
          default: []
        source_terms:
          items:
            type: string
          type: array
          title: Source Terms
        scope_notes:
          items:
            type: string
          type: array
          title: Scope Notes
        figure_ids:
          items:
            type: string
          type: array
          title: Figure Ids
      type: object
      required:
      - series_id
      - year
      - metric
      - metric_label
      - sources
      - conflict
      - attribution
      - source_terms
      - scope_notes
      - figure_ids
      title: SalesCellResponse
      description: '枡ひとつ (シリーズ × 地域 × 暦年 × metric)


        決めごとは docs/sales-grid.md。**同じ枡に出典を何本でも入れられる**

        (#1189) ので、**枡ごとに1つの値を選ぶのはここ**。全部同じ値なら units に

        入り、食い違えば units は null で conflict が立つ——どちらを載せるかは

        人が決めるので、機械は選ばずに「食い違っている」とだけ言う。


        **暦年の行だけが枡になる。** 年度・半期は別の数で、世代の通算と累計は

        別系統 (lifetime)。どちらも枡には入らない。'
    Lang:
      type: string
      enum:
      - en
      title: Lang
      description: An enumeration.
    GetSalesFiguresResponse:
      properties:
        figures:
          items:
            $ref: '#/components/schemas/SalesFigureResponse'
          type: array
          title: Figures
        cells:
          items:
            $ref: '#/components/schemas/SalesCellResponse'
          type: array
          title: Cells
        region_totals:
          items:
            $ref: '#/components/schemas/SalesRegionTotalResponse'
          type: array
          title: Region Totals
        coverage:
          items:
            $ref: '#/components/schemas/SalesCoverageResponse'
          type: array
          title: Coverage
        lifetime:
          items:
            $ref: '#/components/schemas/SalesLifetimeResponse'
          type: array
          title: Lifetime
      type: object
      required:
      - figures
      - cells
      - region_totals
      - coverage
      - lifetime
      title: GetSalesFiguresResponse
      description: '台数の全件と、枡・地域ごとの合計・空欄の状態・別系統の通算


        **行と枡を両方返す。** 行だけだと画面が足し方を決め直すことになり、

        枡だけだと出典の1行が読めなくなる。


        **cells / region_totals / coverage / lifetime はシリーズの単位で作る。**

        割り付け (枡 → 世代) は、その年その地域に世代がいくつ並ぶかで決まるので、

        シリーズの世代が全部そろっていないと決まらない。**`model_id` で絞った

        ときも、この4つはその世代が属するシリーズの分**が入る (絞られるのは

        figures だけ)——世代1つ分の行だけで枡を作ると、同じ枡にある別の出典が

        見えず、出典数と食い違いを取り違える。


        **figures は絞り込みの範囲で全件。** シリーズ通算の行も落とさない——

        出典で確認できた真の値であること、E2E がその台数を使って「画面に出て

        いない」を検査すること、の2つのため'
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
x-refined-from:
- car-gene-com-openapi.json
- car-gene-com-openapi.yml