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

# Get segments data for a company.

> Returns time-series data for revenue, EPS, business segments, and geographic regions.



## OpenAPI

````yaml api-reference/openapi.json get /v1/segments/{exchange}/{symbol}
openapi: 3.0.0
info:
  title: CapyFin API
  description: >-
    The CapyFin API provides access to earnings reports with financials, key
    takeaways, revenue breakdowns, and forward guidance, delivered through a
    powerful, developer-friendly API. For support or enterprise access, please
    contact us at support@capyfin.com.
  version: 1.0.0
  contact:
    name: CapyFin Support
    url: https://capyfin.com/support
    email: support@capyfin.com
servers:
  - url: https://api.capyfin.com
    description: CapyFin API
security:
  - ApiKeyQuery: []
  - ApiKeyHeader: []
tags: []
paths:
  /v1/segments/{exchange}/{symbol}:
    get:
      tags:
        - Segments API
      summary: Get segments data for a company.
      description: >-
        Returns time-series data for revenue, EPS, business segments, and
        geographic regions.
      operationId: getSegments
      parameters:
        - name: exchange
          required: true
          in: path
          description: The exchange of the instrument (e.g. nasdaq).
          schema:
            type: string
        - name: symbol
          required: true
          in: path
          description: The symbol of the instrument (e.g. aapl).
          schema:
            type: string
        - name: type
          required: false
          in: query
          description: Report type (Q for Quarterly, Y for Annual). Default is Q.
          schema:
            enum:
              - Q
              - 'Y'
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SegmentsResponseDto'
components:
  schemas:
    SegmentsResponseDto:
      type: object
      properties:
        revenue:
          description: Revenue series data.
          allOf:
            - $ref: '#/components/schemas/SegmentSeriesDto'
        eps:
          description: EPS series data.
          allOf:
            - $ref: '#/components/schemas/SegmentSeriesDto'
        segments:
          description: List of business segment series.
          type: array
          items:
            $ref: '#/components/schemas/SegmentSeriesDto'
        geo:
          description: List of geographic segment series.
          type: array
          items:
            $ref: '#/components/schemas/SegmentSeriesDto'
      required:
        - revenue
        - eps
        - segments
        - geo
    SegmentSeriesDto:
      type: object
      properties:
        key:
          type: string
          description: The key of the segment/metric.
          example: iphone
        label:
          type: string
          description: The label of the segment/metric.
          example: iPhone Revenue
        unit:
          type: string
          description: The unit of the values (e.g., $).
          example: $
        description:
          type: string
          description: Overview description of the segment.
        data:
          description: List of data points over time.
          type: array
          items:
            $ref: '#/components/schemas/SegmentDataPointDto'
      required:
        - key
        - label
        - data
    SegmentDataPointDto:
      type: object
      properties:
        fiscalPeriod:
          type: string
          description: The fiscal period of the data point (e.g., Q12024, FY2023).
          example: Q12024
        date:
          format: date-time
          type: string
          description: The date of the data point.
          example: '2024-05-02T00:00:00.000Z'
        value:
          type: number
          description: The value of the data point.
          example: 123456789
      required:
        - fiscalPeriod
        - date
        - value
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: apikey
      description: >-
        Pass your API key as a query parameter (e.g.,
        /endpoint?apikey=YOUR_API_KEY)
    ApiKeyHeader:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass your API key as a Bearer token in the header (e.g., Authorization:
        Bearer YOUR_API_KEY)

````