> ## Documentation Index
> Fetch the complete documentation index at: https://docs.numi.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Ask numi to extract a company's filings

> On the Builder plan, puts a company in the queue for extraction. When numi has extracted the filings of the company already, the response is 200 with the company. Otherwise the response is 202 with `request_id`, the integer id of the extraction request, not the `meta.request_id` of the response. The company's data will be in the API after the next run of the queue, which runs once a day. You can ask for a company that is not in numi yet by its CIK, as `cik:` and the digits. If you ask again for a company that is already queued or being extracted, the response has the same `request_id`.



## OpenAPI

````yaml POST /companies/{ref}/extract
openapi: 3.1.0
info:
  title: numi API
  version: 0.1.0
  summary: Company data for US SEC filers.
  description: >
    Segments by XBRL axis (business, product or geography), each axis checked
    against the revenue that the filing reports, and fundamentals as filed.


    Every success response has the form `{ "data": ..., "meta": { "request_id":
    "...", "as_of": "..." } }`, where `as_of` is the time of the response. Every
    error response has the form `{ "error": { "code": "...", "message": "..." },
    "meta": { "request_id": "..." } }`, and some errors have more fields beside
    `code` and `message`.


    The `request_id` is also in the `x-request-id` response header. When you
    write to hello@numi.sh, quote it.
servers:
  - url: https://api.numi.sh/v1
security:
  - ApiKey: []
  - BearerKey: []
paths:
  /companies/{ref}/extract:
    post:
      summary: Ask numi to extract a company's filings
      description: >-
        On the Builder plan, puts a company in the queue for extraction. When
        numi has extracted the filings of the company already, the response is
        200 with the company. Otherwise the response is 202 with `request_id`,
        the integer id of the extraction request, not the `meta.request_id` of
        the response. The company's data will be in the API after the next run
        of the queue, which runs once a day. You can ask for a company that is
        not in numi yet by its CIK, as `cik:` and the digits. If you ask again
        for a company that is already queued or being extracted, the response
        has the same `request_id`.
      operationId: requestExtraction
      parameters:
        - $ref: '#/components/parameters/Ref'
      responses:
        '200':
          description: numi has extracted the filings of the company.
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    type: object
                    required:
                      - status
                      - company
                    properties:
                      status:
                        type: string
                        enum:
                          - done
                      company:
                        $ref: '#/components/schemas/Company'
                    additionalProperties: false
                  meta:
                    $ref: '#/components/schemas/Meta'
                additionalProperties: false
        '202':
          description: The request is queued.
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    type: object
                    required:
                      - status
                      - request_id
                    properties:
                      status:
                        type: string
                        enum:
                          - queued
                      request_id:
                        type: integer
                    additionalProperties: false
                  meta:
                    $ref: '#/components/schemas/Meta'
                additionalProperties: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/PlanRequired'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    Ref:
      name: ref
      in: path
      required: true
      description: >-
        The company, as a ticker such as `MSFT` or `BRK.B`, or as `cik:` and the
        digits of its CIK (the SEC's Central Index Key), such as `cik:789019`. A
        ticker matches in upper or lower case, and `.` and `-` match each other,
        so `BRK.B` and `BRK-B` are the same company.
      schema:
        type: string
        pattern: ^([Cc][Ii][Kk]:[0-9]{1,10}|[A-Za-z0-9.-]{1,16})$
        example: MSFT
  headers:
    RequestId:
      description: >-
        The id of the request. It is also in `meta.request_id` of the body. When
        you write to hello@numi.sh, quote it.
      schema:
        $ref: '#/components/schemas/RequestId'
  schemas:
    Company:
      type: object
      description: One SEC filer.
      required:
        - cik
        - ticker
        - tickers
        - name
        - exchange
      properties:
        cik:
          type: string
          pattern: ^[0-9]{10}$
          description: The CIK, zero-padded to ten digits.
          example: '0000789019'
        ticker:
          type:
            - string
            - 'null'
          description: The primary ticker.
          example: MSFT
        tickers:
          type: array
          items:
            type: string
          description: Every ticker of the company.
        name:
          type: string
          example: MICROSOFT CORPORATION
        exchange:
          type:
            - string
            - 'null'
          example: Nasdaq
      additionalProperties: false
    Meta:
      type: object
      description: The metadata of one success response.
      required:
        - request_id
        - as_of
      properties:
        request_id:
          $ref: '#/components/schemas/RequestId'
        as_of:
          type: string
          format: date-time
          description: The time of the response, in UTC.
          example: '2026-10-19T12:34:56.789Z'
      additionalProperties: false
    RequestId:
      type: string
      pattern: ^req_[A-Za-z0-9_-]{16}$
      description: The id of one request.
      example: req_Qm3xYb9Kd2LpR7wA
    ErrorEnvelope:
      type: object
      description: The body of every error response.
      required:
        - error
        - meta
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
        meta:
          type: object
          description: The metadata of one error response.
          required:
            - request_id
          properties:
            request_id:
              $ref: '#/components/schemas/RequestId'
          additionalProperties: false
      additionalProperties: false
    ErrorBody:
      type: object
      description: >-
        The error. Some errors have more fields beside the code and the message.
        A `rate_limit_exceeded` error has `retry_after` and `scope`, and a
        `sandbox_restricted` error has `sandbox_companies`, the tickers of the
        companies that you can read with a sandbox key.
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - unauthorized
            - invalid_key
            - rate_limit_exceeded
            - bad_request
            - not_found
            - plan_required
            - sandbox_restricted
            - key_limit
            - conflict
            - internal_error
            - service_unavailable
          description: >
            A code for programs to branch on.


            - `unauthorized`: the request has no API key, or an account route
            has no session.

            - `invalid_key`: the key is not valid, or it was revoked.

            - `rate_limit_exceeded`: the account is at the request limit of its
            plan for the minute or the day, or the IP address is at its limit
            for the minute.

            - `bad_request`: a parameter is missing or wrong, or the body is not
            valid JSON or is too large.

            - `not_found`: nothing matches the request.

            - `plan_required`: the plan of the account does not include the
            endpoint, such as on-demand extraction on the sandbox plan.

            - `sandbox_restricted`: the request is for a company outside the
            sandbox, with a sandbox key.

            - `key_limit`: the account has as many active keys as its plan
            allows.

            - `conflict`: a checkout for an account that is on the Builder plan
            already, or the billing portal for an account with no subscription.

            - `internal_error`: the server failed. When you write to
            hello@numi.sh, quote the request id.

            - `service_unavailable`: the server is not configured for the
            feature, such as accounts, billing or bulk files.
        message:
          type: string
          description: >-
            A sentence that says what went wrong and, where it helps, what to
            do.
      additionalProperties: true
  responses:
    BadRequest:
      description: >-
        A parameter is missing or wrong, or the body is not valid JSON or is too
        large.
      headers:
        x-request-id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: bad_request
              message: 'limit: must be from 1 to 50'
            meta:
              request_id: req_Qm3xYb9Kd2LpR7wA
    Unauthorized:
      description: The request has no API key, or the key is not valid or was revoked.
      headers:
        x-request-id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: unauthorized
              message: >-
                The request has no API key. Send a numi API key in the X-API-Key
                header.
            meta:
              request_id: req_Qm3xYb9Kd2LpR7wA
    PlanRequired:
      description: >-
        The plan of the account does not include the endpoint, such as on-demand
        extraction on the sandbox plan.
      headers:
        x-request-id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: plan_required
              message: >-
                You can ask numi to extract a company on the Builder plan only.
                Upgrade at https://numi.sh/account.
            meta:
              request_id: req_Qm3xYb9Kd2LpR7wA
    NotFound:
      description: Nothing matches the request.
      headers:
        x-request-id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: not_found
              message: >-
                The API has no route for GET /v1/nothing. Find the routes of the
                API at https://docs.numi.sh.
            meta:
              request_id: req_Qm3xYb9Kd2LpR7wA
    RateLimited:
      description: >-
        The account is at the request limit of its plan for the minute or the
        day, or the IP address is at its limit for the minute. Wait the number
        of seconds in the `Retry-After` header. `scope` is `minute` or `day`,
        for the limit that was reached.
      headers:
        x-request-id:
          $ref: '#/components/headers/RequestId'
        Retry-After:
          description: The number of seconds to wait before the next request.
          schema:
            type: integer
            minimum: 1
            example: 12
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: rate_limit_exceeded
              message: >-
                The sandbox plan has a limit of 20 requests a minute. Retry in
                12 seconds.
              retry_after: 12
              scope: minute
            meta:
              request_id: req_Qm3xYb9Kd2LpR7wA
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: A numi API key, sent in the `X-API-Key` header.
    BearerKey:
      type: http
      scheme: bearer
      description: 'A numi API key, sent as `Authorization: Bearer <key>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.