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

# Get Google Business Profile performance metrics

> Returns daily time series for a location: how many people saw it on Google Search and Maps, and how many then called, asked for directions, messaged, booked, ordered, or clicked through to the website. start_date and end_date are inclusive and formatted YYYY-MM-DD. metric takes a comma-separated list and defaults to every metric. A day with no activity comes back as a zero rather than a gap. Google publishes no retention window and no freshness lag for this data, so a recent day may still be filling in and an old range may return nothing.



## OpenAPI

````yaml /api-reference/openapi.json get /platforms/google/accounts/{id}/insights
openapi: 3.0.0
info:
  description: >-
    Unified social media inbox API. Read and respond to comments, DMs, reviews,
    and mentions across Instagram, Facebook, Threads, Google Business Profile,
    TikTok, LinkedIn, and YouTube through a single REST API. X/Twitter and
    Trustpilot coming soon.
  title: SocialAPI.AI
  contact:
    name: SocialAPI.AI Support
    email: support@social-api.ai
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.social-api.ai/v1
security: []
paths:
  /platforms/google/accounts/{id}/insights:
    get:
      tags:
        - Google
      summary: Get Google Business Profile performance metrics
      description: >-
        Returns daily time series for a location: how many people saw it on
        Google Search and Maps, and how many then called, asked for directions,
        messaged, booked, ordered, or clicked through to the website. start_date
        and end_date are inclusive and formatted YYYY-MM-DD. metric takes a
        comma-separated list and defaults to every metric. A day with no
        activity comes back as a zero rather than a gap. Google publishes no
        retention window and no freshness lag for this data, so a recent day may
        still be filling in and an old range may return nothing.
      parameters:
        - description: Connected account ID
          name: id
          in: path
          required: true
          schema:
            type: string
        - description: Inclusive start date, YYYY-MM-DD
          name: start_date
          in: query
          required: true
          schema:
            type: string
        - description: Inclusive end date, YYYY-MM-DD
          name: end_date
          in: query
          required: true
          schema:
            type: string
        - description: Comma-separated metric names, defaults to all
          name: metric
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.GoogleInsightsResponse'
        '400':
          description: Missing or invalid parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '404':
          description: Unknown account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '502':
          description: Upstream Google API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api_endpoints.GoogleInsightsResponse:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/social-api_ai_core_api_connectors_base.GBPInsights
    api_endpoints.ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/api_endpoints.ErrorBody'
    social-api_ai_core_api_connectors_base.GBPInsights:
      type: object
      properties:
        end_date:
          type: string
        metrics:
          type: array
          items:
            $ref: >-
              #/components/schemas/social-api_ai_core_api_connectors_base.GBPMetricSeries
        start_date:
          type: string
    api_endpoints.ErrorBody:
      type: object
      properties:
        code:
          type: string
          example: resource.not_found
        message:
          type: string
          example: Account not found
        meta:
          type: object
          additionalProperties: {}
    social-api_ai_core_api_connectors_base.GBPMetricSeries:
      type: object
      properties:
        metric:
          type: string
        points:
          type: array
          items:
            $ref: >-
              #/components/schemas/social-api_ai_core_api_connectors_base.GBPInsightsPoint
        total:
          type: integer
    social-api_ai_core_api_connectors_base.GBPInsightsPoint:
      type: object
      properties:
        date:
          type: string
        value:
          type: integer
  securitySchemes:
    BearerAuth:
      description: >-
        Prefix your API key with "Bearer ". Example: `Authorization: Bearer
        sapi_key_...`
      type: apiKey
      name: Authorization
      in: header

````