MetricDuck Data API

The Data API API from MetricDuck — 2 operation(s) for data api.

GitHub OpenAPI

Operations 2

GET /api/v1/data/metrics Query financial metrics #
GET /api/v1/data/metrics/catalog List available metrics and dimensions #

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/metricduck-com:metricduck-com-data-api-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

metricduck-com-data-api-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Metric Duck Data API
  description: 'SEC filing data API: equity fundamentals updated daily from SEC EDGAR'
  version: 2.0.0
tags:
- name: Data API
paths:
  /api/v1/data/metrics:
    get:
      tags:
      - Data API
      summary: Query financial metrics
      description: 'Flexible endpoint for querying financial metrics across multiple companies.


        **Features:**

        - Query up to 200 tickers, 70+ curated metrics

        - Historical data up to 10 years

        - Support for TTM, quarterly, and annual periods

        - Optional dimensions for trend/statistical analysis (Q.TREND8, Q.MED8, TTM.YOY, etc.)

        - Price basis: `price=current` recomputes valuation metrics at the latest end-of-day close

        - Credit-based billing: `dry_run=true` to preview cost before querying


        **Credit Formula:** `tickers × metrics × periods_factor`

        - TTM/Annual: periods_factor = years

        - Quarterly: periods_factor = years × 4

        - Each dimension adds 1 to periods_factor


        **Example:**

        ```

        GET /api/v1/data/metrics?tickers=AAPL,MSFT,GOOGL&metrics=revenues,roic,roe&period=ttm&years=2

        GET /api/v1/data/metrics?tickers=AAPL&metrics=roic&period=quarterly&dimensions=Q.TREND8,Q.MED8

        GET /api/v1/data/metrics?tickers=AAPL&metrics=pe_ratio,ev_ebitda&period=ttm&price=current&dry_run=true

        ```'
      operationId: get_metrics_api_v1_data_metrics_get
      security:
      - HTTPBearer: []
      - APIKeyHeader: []
      parameters:
      - name: tickers
        in: query
        required: true
        schema:
          type: string
          description: Comma-separated stock tickers (e.g., AAPL,MSFT,GOOGL)
          title: Tickers
        description: Comma-separated stock tickers (e.g., AAPL,MSFT,GOOGL)
        example: AAPL,MSFT,GOOGL
      - name: metrics
        in: query
        required: true
        schema:
          type: string
          description: Comma-separated metric IDs (e.g., revenues,roic,roe)
          title: Metrics
        description: Comma-separated metric IDs (e.g., revenues,roic,roe)
        example: revenues,roic,roe,gross_margin
      - name: period
        in: query
        required: false
        schema:
          type: string
          pattern: ^(ttm|quarterly|annual)$
          description: 'Period type: ttm (trailing twelve months), quarterly, or annual'
          default: ttm
          title: Period
        description: 'Period type: ttm (trailing twelve months), quarterly, or annual'
      - name: years
        in: query
        required: false
        schema:
          type: integer
          maximum: 10
          minimum: 1
          description: Years of historical data (1-10)
          default: 2
          title: Years
        description: Years of historical data (1-10)
      - name: dimensions
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Comma-separated compound period types for trend/statistical analysis (e.g., Q.TREND8,Q.MED8,TTM.YOY)
          title: Dimensions
        description: Comma-separated compound period types for trend/statistical analysis (e.g., Q.TREND8,Q.MED8,TTM.YOY)
        example: Q.TREND8,Q.MED8
      - name: price
        in: query
        required: false
        schema:
          type: string
          pattern: ^(historical|current)$
          description: 'Price basis for valuation metrics: historical (period-end) or current (latest end-of-day close)'
          default: historical
          title: Price
        description: 'Price basis for valuation metrics: historical (period-end) or current (latest end-of-day close)'
      - name: dry_run
        in: query
        required: false
        schema:
          type: boolean
          description: If true, return credit cost estimate without querying data
          default: false
          title: Dry Run
        description: If true, return credit cost estimate without querying data
      - name: api_key
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Api Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataAPIResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/data/metrics/catalog:
    get:
      tags:
      - Data API
      summary: List available metrics and dimensions
      description: Returns the list of all available metrics organized by category, plus allowed dimensions for trend/statistical analysis.
      operationId: get_metrics_catalog_api_v1_data_metrics_catalog_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Get Metrics Catalog Api V1 Data Metrics Catalog Get
components:
  schemas:
    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
    RequestMetadata:
      properties:
        tickers:
          items:
            type: string
          type: array
          title: Tickers
          description: Requested tickers
        metrics:
          items:
            type: string
          type: array
          title: Metrics
          description: Requested metric IDs
        period:
          type: string
          title: Period
          description: Period type (ttm, quarterly, annual)
        years:
          type: integer
          title: Years
          description: Years of historical data
        dimensions:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Dimensions
          description: Compound period types requested (Q.TREND8, Q.MED8, TTM.YOY, etc.)
        price:
          type: string
          title: Price
          description: 'Price basis: historical (period-end) or current (today''s price)'
          default: historical
      type: object
      required:
      - tickers
      - metrics
      - period
      - years
      title: RequestMetadata
      description: Metadata about the original request
    CompanyData:
      properties:
        company_name:
          type: string
          title: Company Name
          description: Company name
        cik:
          type: string
          title: Cik
          description: SEC CIK identifier
        metrics:
          additionalProperties:
            $ref: '#/components/schemas/MetricData'
          type: object
          title: Metrics
          description: Metrics by metric_id
      type: object
      required:
      - company_name
      - cik
      title: CompanyData
      description: Company data with all requested metrics
    ResponseMetadata:
      properties:
        price_attribution:
          anyOf:
          - type: string
          - type: 'null'
          title: Price Attribution
          description: The price source's required attribution, present only when the prices in this response come from a source that requires one (IEX HIST).
        request:
          $ref: '#/components/schemas/RequestMetadata'
        resolved_tickers:
          type: integer
          title: Resolved Tickers
          description: Number of tickers found
        total_values:
          type: integer
          title: Total Values
          description: Total metric values returned
        generated_at:
          type: string
          format: date-time
          title: Generated At
        warnings:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Warnings
          description: Warnings about missing dimension data (e.g., 'No Q.TREND8 data for shares_outstanding (AAPL)')
        credits:
          anyOf:
          - $ref: '#/components/schemas/CreditInfo'
          - type: 'null'
          description: Credit usage info (present for authenticated developer-tier users)
      type: object
      required:
      - request
      - resolved_tickers
      - total_values
      title: ResponseMetadata
      description: Metadata about the response
    MetricData:
      properties:
        display_name:
          type: string
          title: Display Name
          description: Human-readable metric name
        unit:
          anyOf:
          - type: string
          - type: 'null'
          title: Unit
          description: Unit type (usd, pct, ratio)
        values:
          items:
            $ref: '#/components/schemas/MetricValue'
          type: array
          title: Values
          description: Historical values
      type: object
      required:
      - display_name
      title: MetricData
      description: Metric data with metadata and historical values
    MetricValue:
      properties:
        period:
          type: string
          title: Period
          description: Period type (TTM, Q1 2024, FY 2023)
        period_end:
          type: string
          title: Period End
          description: Period end date (YYYY-MM-DD)
        value:
          anyOf:
          - type: number
          - type: 'null'
          title: Value
          description: Metric value
        dimension:
          anyOf:
          - type: string
          - type: 'null'
          title: Dimension
          description: Compound period type dimension (Q.TREND8, Q.MED8, TTM.YOY, etc.)
      type: object
      required:
      - period
      - period_end
      title: MetricValue
      description: Single metric value for a period
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CreditInfo:
      properties:
        used:
          type: integer
          title: Used
          description: Credits used for this request
        total_used_this_month:
          type: integer
          title: Total Used This Month
          description: Total credits used in current billing month
        monthly_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Monthly Limit
          description: Monthly credit limit (null if unlimited)
        remaining:
          anyOf:
          - type: integer
          - type: 'null'
          title: Remaining
          description: Credits remaining this month (null if unlimited)
      type: object
      required:
      - used
      - total_used_this_month
      title: CreditInfo
      description: Credit usage information for flexible budget metering.
    DataAPIResponse:
      properties:
        data:
          additionalProperties:
            $ref: '#/components/schemas/CompanyData'
          type: object
          title: Data
          description: Company data keyed by ticker
        metadata:
          $ref: '#/components/schemas/ResponseMetadata'
      type: object
      required:
      - data
      - metadata
      title: DataAPIResponse
      description: 'Response for GET /api/v1/data/metrics


        Nested JSON structure with companies as top-level keys,

        each containing their metrics and values.'
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key