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

# Get analytics data breakdowns

> This endpoint is used to get analytics data for a specified category.

export const ScopesList = ({scopes = [], description = "この API には、次のいずれかのスコープが必要です。"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

<Accordion title="Scope requirements">
  <ScopesList scopes={['business-intelligence']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/v2/reporting-v2.json GET /analytics/v2/reports/{breakdown_by}/{time_period}
openapi: 3.0.0
info:
  title: Reporting API v2
  version: 2.0.0
  description: >-
    Use the reporting API to export analytics and reporting data from HubSpot.
    Primarily used for connecting HubSpot metrics to metrics stored in other
    business intelligence tools.
servers:
  - url: https://api.hubapi.com
    description: HubSpot API Server
security: []
paths:
  /analytics/v2/reports/{breakdown_by}/{time_period}:
    get:
      summary: Get analytics data breakdowns
      description: This endpoint is used to get analytics data for a specified category.
      operationId: getAnalyticsBreakdowns
      parameters:
        - name: breakdown_by
          in: path
          required: true
          description: The category used to break down the analytics data.
          schema:
            type: string
            enum:
              - totals
              - sessions
              - sources
              - geolocation
              - utm-campaigns
              - utm-contents
              - utm-mediums
              - utm-sources
              - utm-terms
        - name: time_period
          in: path
          required: true
          description: The time period used to group the data.
          schema:
            type: string
            enum:
              - total
              - daily
              - weekly
              - monthly
              - summarize/daily
              - summarize/weekly
              - summarize/monthly
        - name: start
          in: query
          required: true
          description: >-
            The start date for the data you want. Must be included as ISO 8601
            format, YYYYMMDD.
          schema:
            type: string
            pattern: ^\d{8}$
        - name: end
          in: query
          required: true
          description: >-
            The end date for the data you want. Must be included as ISO 8601
            format, YYYYMMDD.
          schema:
            type: string
            pattern: ^\d{8}$
        - name: d1
          in: query
          description: Used to drilldown into the data.
          schema:
            type: string
        - name: d2
          in: query
          description: Used to further drill down into the data.
          schema:
            type: string
        - name: f
          in: query
          description: >-
            Filter the returned data to include only the specified breakdown.
            May be included multiple times.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: e
          in: query
          description: >-
            Exclude data for the specified breakdown. May be included multiple
            times.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: filterId
          in: query
          description: The ID of an Analytics view.
          schema:
            type: integer
        - name: sort
          in: query
          description: If included, the results are sorted by the specified field.
          schema:
            type: string
        - name: sortDir
          in: query
          description: Controls the direction of sorted results.
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: DESC
        - name: limit
          in: query
          description: Used to limit the number of results per request.
          schema:
            type: integer
            default: 350
        - name: offset
          in: query
          description: Used to get the next page of results.
          schema:
            type: integer
      responses:
        '200':
          description: Analytics data retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsBreakdownResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AnalyticsBreakdownResponse:
      type: object
      properties:
        offset:
          type: integer
          description: The offset for pagination
        total:
          type: integer
          description: The total number of results
        totals:
          $ref: '#/components/schemas/AnalyticsMetrics'
        breakdowns:
          type: array
          items:
            $ref: '#/components/schemas/AnalyticsBreakdown'
    Error:
      type: object
      properties:
        category:
          type: string
          description: The error category
        correlationId:
          type: string
          description: A unique identifier for the request
        message:
          type: string
          description: A human readable message describing the error
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
        errors:
          type: array
          description: Further information about the error
          items:
            $ref: '#/components/schemas/ErrorDetail'
        context:
          type: object
          description: Context about the error condition
        links:
          type: object
          description: A map of link names to associated URIs
      required:
        - category
        - correlationId
        - message
    AnalyticsMetrics:
      type: object
      properties:
        rawViews:
          type: integer
          description: Number of raw views
        visits:
          type: integer
          description: Number of visits
        visitors:
          type: integer
          description: Number of visitors
        leads:
          type: integer
          description: Number of leads
        contacts:
          type: integer
          description: Number of contacts
        subscribers:
          type: integer
          description: Number of subscribers
        marketingQualifiedLeads:
          type: integer
          description: Number of marketing qualified leads
        salesQualifiedLeads:
          type: integer
          description: Number of sales qualified leads
        opportunities:
          type: integer
          description: Number of opportunities
        customers:
          type: integer
          description: Number of customers
        pageviewsPerSession:
          type: number
          description: Average pageviews per session
        bounceRate:
          type: number
          description: Bounce rate
        timePerSession:
          type: number
          description: Average time per session
        newVisitorSessionRate:
          type: number
          description: New visitor session rate
        sessionToContactRate:
          type: number
          description: Session to contact rate
        contactToCustomerRate:
          type: number
          description: Contact to customer rate
        ctaViews:
          type: integer
          description: Number of CTA views
        submissions:
          type: integer
          description: Number of submissions
        entrances:
          type: integer
          description: Number of entrances
        exits:
          type: integer
          description: Number of exits
        timePerPageview:
          type: number
          description: Average time per pageview
        pageBounceRate:
          type: number
          description: Page bounce rate
        exitsPerPageview:
          type: number
          description: Exits per pageview
    AnalyticsBreakdown:
      type: object
      properties:
        breakdown:
          type: string
          description: The breakdown value
        meta:
          type: string
          description: Meta information about the breakdown
      allOf:
        - $ref: '#/components/schemas/AnalyticsMetrics'
    ErrorDetail:
      type: object
      properties:
        message:
          type: string
          description: A human readable message describing the error
        in:
          type: string
          description: The name of the field or parameter in which the error was found
        code:
          type: string
          description: The status code associated with the error detail
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
        context:
          type: object
          description: Context about the error condition
      required:
        - message

````