Looker Studio Data API

Operations for fetching data from the external source and returning it to Looker Studio.

Documentation

Specifications

Schemas & Data

Other Resources

🔗
Reference
https://developers.google.com/looker-studio/integrate/api/reference
🔗
SDKs
https://developers.google.com/looker-studio/api/client-libraries
🔗
ErrorCodes
https://developers.google.com/looker-studio/api/errors
🔗
Security
https://developers.google.com/looker-studio/connector/embed-row-level-security
🔗
Reference
https://developers.google.com/looker-studio/connector/reference
🔗
Examples
https://developers.google.com/looker-studio/connector/examples
🔗
Gallery
https://lookerstudio.google.com/data
🔗
ChangeLog
https://developers.google.com/looker-studio/connector/changelog
🔗
Publishing
https://developers.google.com/looker-studio/connector/publish-connector
🔗
Sharing
https://developers.google.com/looker-studio/connector/share
🔗
Direct Links
https://developers.google.com/looker-studio/connector/direct-links
🔗
Codelabs
https://codelabs.developers.google.com/codelabs/community-connectors
🔗
Reference
https://developers.google.com/looker-studio/visualization/library-reference
🔗
SDKs
https://developers.google.com/looker-studio/visualization/library
🔗
Local Development
https://developers.google.com/looker-studio/visualization/local-dev
🔗
Open Source
https://developers.google.com/looker-studio/visualization/open-source
🔗
Interactions
https://developers.google.com/looker-studio/visualization/interactions-guide
🔗
Support
https://developers.google.com/looker-studio/visualization/support
🔗
Codelabs
https://codelabs.developers.google.com/codelabs/community-visualization

OpenAPI Specification

looker-studio-data-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Looker Studio Assets Data API
  description: The Looker Studio API enables developers to programmatically manage reports, data sources, and permissions. It provides methods for searching assets and managing asset permissions including getting, updating, adding, and removing members. The API is available to users that belong to an organization with Google Workspace or Cloud Identity.
  version: v1
  contact:
    name: Google
    url: https://developers.google.com/looker-studio/integrate/api
  license:
    name: Google APIs Terms of Service
    url: https://developers.google.com/terms
  termsOfService: https://developers.google.com/terms
servers:
- url: https://datastudio.googleapis.com/v1
  description: Looker Studio API production server
security:
- oauth2: []
tags:
- name: Data
  description: Operations for fetching data from the external source and returning it to Looker Studio.
paths:
  /connector/getData:
    post:
      operationId: getData
      summary: Looker Studio Get data rows
      description: Fetches tabular data from the external source matching the request criteria. Receives configuration parameters, optional date ranges, requested field names, and dimension filters. Returns rows with values in the schema-defined order. Limited to 1 million rows per request.
      tags:
      - Data
      requestBody:
        required: true
        description: The request specifying which fields to retrieve, optional date range, and any filters to apply.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetDataRequest'
      responses:
        '200':
          description: The data rows matching the request criteria.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDataResponse'
components:
  schemas:
    FieldSemantics:
      type: object
      description: Semantic information about a field.
      properties:
        conceptType:
          type: string
          description: Whether the field is a dimension or metric.
          enum:
          - DIMENSION
          - METRIC
        semanticType:
          type: string
          description: The semantic type describing the meaning of the field values. Common types include TEXT, NUMBER, BOOLEAN, YEAR, YEAR_MONTH_DAY, PERCENT, CURRENCY_USD, COUNTRY, CITY, and LATITUDE_LONGITUDE among others.
          enum:
          - TEXT
          - NUMBER
          - BOOLEAN
          - PERCENT
          - CURRENCY_USD
          - CURRENCY_EUR
          - CURRENCY_GBP
          - CURRENCY_JPY
          - YEAR
          - YEAR_QUARTER
          - YEAR_MONTH
          - YEAR_MONTH_DAY
          - YEAR_MONTH_DAY_HOUR
          - YEAR_MONTH_DAY_SECOND
          - QUARTER
          - MONTH
          - WEEK
          - DAY_OF_WEEK
          - HOUR
          - MINUTE
          - DURATION
          - COUNTRY
          - COUNTRY_CODE
          - CONTINENT
          - CONTINENT_CODE
          - SUB_CONTINENT
          - SUB_CONTINENT_CODE
          - REGION
          - REGION_CODE
          - CITY
          - CITY_CODE
          - METRO
          - METRO_CODE
          - LATITUDE_LONGITUDE
          - URL
        semanticGroup:
          type: string
          description: The semantic group for the field.
        isReaggregatable:
          type: boolean
          description: Whether the metric can be re-aggregated.
    DimensionFilter:
      type: object
      description: A filter applied to a dimension field.
      properties:
        fieldName:
          type: string
          description: The name of the dimension field to filter.
        values:
          type: array
          description: The values to filter by.
          items:
            type: string
        type:
          type: string
          description: The filter operator type.
          enum:
          - EQUALS
          - CONTAINS
          - REGEXP_PARTIAL_MATCH
          - REGEXP_EXACT_MATCH
          - IN_LIST
          - IS_NULL
          - BETWEEN
          - NUMERIC_GREATER_THAN
          - NUMERIC_GREATER_THAN_OR_EQUAL
          - NUMERIC_LESS_THAN
          - NUMERIC_LESS_THAN_OR_EQUAL
        operator:
          type: string
          description: The logical operator for combining multiple filter conditions.
          enum:
          - AND
          - OR
    GetDataResponse:
      type: object
      description: Response containing the requested data rows.
      properties:
        schema:
          type: array
          description: The field definitions for the returned data, in the order they appear in each row.
          items:
            $ref: '#/components/schemas/Field'
        rows:
          type: array
          description: The data rows. Each row contains values in schema-defined order.
          items:
            type: object
            properties:
              values:
                type: array
                description: The field values for this row in the same order as the schema fields.
                items:
                  oneOf:
                  - type: string
                  - type: number
                  - type: boolean
        filtersApplied:
          type: boolean
          description: Whether the connector applied the requested filters.
    Field:
      type: object
      description: Defines a single field in the connector's data schema.
      properties:
        name:
          type: string
          description: The unique identifier for the field.
        label:
          type: string
          description: The display name for the field.
        description:
          type: string
          description: A description of the field's contents.
        dataType:
          type: string
          description: The data type of the field values.
          enum:
          - STRING
          - NUMBER
          - BOOLEAN
        semantics:
          $ref: '#/components/schemas/FieldSemantics'
        group:
          type: string
          description: An optional group name for organizing related fields.
        formula:
          type: string
          description: An optional calculated field formula.
        isDefault:
          type: boolean
          description: Whether this field is included by default in new charts.
        defaultAggregationType:
          type: string
          description: The default aggregation type for metric fields.
          enum:
          - AVG
          - COUNT
          - COUNT_DISTINCT
          - MAX
          - MIN
          - SUM
          - AUTO
          - NONE
        isHidden:
          type: boolean
          description: Whether the field is hidden from the user interface.
    GetDataRequest:
      type: object
      description: Request for fetching data rows from the connector.
      properties:
        configParams:
          type: object
          description: The user-configured parameters.
          additionalProperties:
            type: string
        dateRange:
          type: object
          description: The date range for the data request if dateRangeRequired is true.
          properties:
            startDate:
              type: string
              format: date
              description: Start date in YYYY-MM-DD format.
            endDate:
              type: string
              format: date
              description: End date in YYYY-MM-DD format.
        fields:
          type: array
          description: The list of field names to include in the response.
          items:
            type: object
            properties:
              name:
                type: string
                description: The field name as defined in the schema.
        dimensionFilters:
          type: array
          description: Filters to apply to dimension fields.
          items:
            $ref: '#/components/schemas/DimensionFilter'
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth 2.0 authentication with domain-wide delegation. Requires Google Workspace or Cloud Identity organization.
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/datastudio: Full access to manage Looker Studio assets and permissions.
            https://www.googleapis.com/auth/datastudio.readonly: Read-only access to Looker Studio assets.
            https://www.googleapis.com/auth/userinfo.profile: Access to user profile information.
externalDocs:
  description: Looker Studio API Reference
  url: https://developers.google.com/looker-studio/integrate/api/reference