GroundTruth Demand API

Demand API documentation

Operations 59

GET /demand/v1/account/{accountID}/totals Get account level cumulative data.
GET /demand/v1/adgroup/{adgroupID}/daily Get adgroup level daily data.
GET /demand/v1/adgroup/{adgroupID}/totals Get adgroup level cumulative data.
GET /demand/v1/campaign/{campaignID}/daily Get campaign level daily data.
GET /demand/v1/campaign/{campaignID}/totals Get campaign level cumulative data.
GET /demand/v1/org/{organizationID}/totals Get organization level data
GET /demand/v1/campaign/product/{campaignID} Get product level data by campaign_id
GET /demand/v1/adgroups/product/{campaignID} Get product level for all the adgroups under the campaign
GET /demand/v1/creatives/product/{campaignID} Get product level for all the creatives under the campaign
GET /demand/v1/campaign/locations/{campaignID} Get Location data
GET /demand/v1/adgroup/locations/{adgroupID} Get Location data
GET /demand/v1/campaign/sv_locations/{campaignID} Get SV Location data
GET /demand/v1/adgroup/sv_locations/{adgroupID} Get SV Location data
GET /demand/v1/org/account_count/{tenantID} Get count of accounts
GET /demand/v1/account/conversion_tracking/{accountID} Get conversion tracking for all the adgroups under the account
GET /demand/v1/creatives/{campaignID}/daily Get creative level data under the campaign
GET /demand/v1/campaign/behavioral_audience/{campaignID} Get campaign level behavioral_audience data under the campaign
GET /demand/v1/adgroups/behavioral_audience/{campaignID} Get adgroup level behavioral_audience data under the campaign.
GET /demand/v1/creatives/behavioral_audience/{campaignID} Get creative level behavioral_audience data under the campaign.
GET /demand/v1/campaign/category/{campaignID} Get campaign level category data under the campaign.
GET /demand/v1/adgroups/category/{campaignID} Get adgroup level category data under the campaign.
GET /demand/v1/creatives/category/{campaignID} Get creative level category data under the campaign.
GET /demand/v1/campaign/brand_affinity/{campaignID} Get campaign level brand_affinity data under the campaign.
GET /demand/v1/adgroups/brand_affinity/{campaignID} Get adgroup level brand_affinity data under the campaign.
GET /demand/v1/creatives/brand_affinity/{campaignID} Get creative level brand_affinity data under the campaign.
GET /demand/v1/campaign/demographic/{campaignID} Get demographic data under the campaign.
GET /demand/v1/campaign/device_type/{campaignID} Get device_type data at campaign level.
GET /demand/v1/adgroups/device_type/{campaignID} Get adgroup level device_type data under a campaign.
GET /demand/v1/timeseries/tod/export/campaign/{campaignID} Get campaign level time of day data under a campaign.
GET /demand/v1/timeseries/tod/export/adgroups/{campaignID} Get adgroup level time of day data under a campaign.
GET /demand/v1/timeseries/tod/export/creatives/{campaignID} Get creative level time of day data under a campaign.
GET /demand/v2/campaign/product/{campaignID} Get product level data by campaign_id
GET /demand/v2/adgroups/product/{campaignID} Get product level for all the adgroups under the campaign
GET /demand/v2/creatives/product/{campaignID} Get product level for all the creatives under the campaign
GET /demand/v3/campaign/product/{campaignID} Get product level data by campaign_id
GET /demand/v3/adgroups/product/{campaignID} Get product level for all the adgroups under the campaign
GET /demand/v3/creatives/product/{campaignID} Get product level for all the creatives under the campaign
GET /demand/v2/campaign/behavioral_audience/{campaignID} Get campaign level behavioral_audience data under the campaign
GET /demand/v2/adgroups/behavioral_audience/{campaignID} Get adgroup level behavioral_audience data under the campaign.
GET /demand/v2/creatives/behavioral_audience/{campaignID} Get creative level behavioral_audience data under the campaign.
GET /demand/v2/campaign/category/{campaignID} Get campaign level category data under the campaign.
GET /demand/v2/adgroups/category/{campaignID} Get adgroup level category data under the campaign.
GET /demand/v2/creatives/category/{campaignID} Get creative level category data under the campaign.
GET /demand/v2/campaign/brand_affinity/{campaignID} Get campaign level brand_affinity data under the campaign.
GET /demand/v2/adgroups/brand_affinity/{campaignID} Get adgroup level brand_affinity data under the campaign.
GET /demand/v2/creatives/brand_affinity/{campaignID} Get creative level brand_affinity data under the campaign.
GET /demand/v2/campaign/sv_locations/{campaignID} Get SV Location data
GET /demand/V2/adgroup/sv_locations/{adgroupID} Get SV Location data
GET /demand/v2/campaign/publisher/{campaignID} Get campaign level publisher data for CTV/OTT campaigns
GET /demand/v2/adgroups/publisher/{campaignID} Get adgroup level publisher data for CTV/OTT campaigns
GET /demand/v2/campaign/network/{campaignID} Get campaign level network data for CTV/OTT campaigns
GET /demand/v2/campaign/audio/streaming_genre/{campaignID} Get campaign level streaming genre data for AUDIO campaigns
GET /demand/v2/adgroups/audio/streaming_genre/{campaignID} Get adgroup level streaming genre data under AUDIO campaigns
GET /demand/v2/campaign/audio/podcast_topic/{campaignID} Get campaign level podcast topic data for AUDIO campaigns
GET /demand/v2/adgroups/audio/podcast_topic/{campaignID} Get adgroup level podcast topic data under AUDIO campaigns
GET /demand/v2/campaign/audio/podcast_series/{campaignID} Get campaign level podcast series data for AUDIO campaigns
GET /demand/v2/adgroups/audio/podcast_series/{campaignID} Get adgroup level podcast series data under AUDIO campaigns
GET /demand/v2/campaign/audio/publisher/{campaignID} Get campaign level publisher data for AUDIO campaigns
GET /demand/v2/adgroups/audio/publisher/{campaignID} Get adgroup level publisher data under AUDIO campaigns

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/groundtruth-demand-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

groundtruth-demand-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Groundtruth Reporting Demand API
  description: "**External reporting API.**  \n\n *Note:* All REST API endpoints currently require HTTP/1.1. Please use HTTP/1.1 (e.g., by adding `--http1.1` in curl commands) to receive a response."
  version: 2.0.0
servers:
- url: https://reporting.groundtruth.com
  description: Production
tags:
- description: Demand API documentation
  name: demand
paths:
  /demand/v1/account/{accountID}/totals:
    get:
      description: Get account level cumulative data.
      tags:
      - demand
      parameters:
      - in: header
        name: X-GT-USER-ID
        required: true
        schema:
          type: string
      - in: header
        name: X-GT-API-KEY
        required: true
        schema:
          type: string
      - description: request account
        in: path
        name: accountID
        required: true
        schema:
          format: int64
          type: integer
      - description: start date for data pull.
        in: query
        name: start_date
        required: true
        schema:
          type: string
      - description: end date for data pull
        in: query
        name: end_date
        required: true
        schema:
          type: string
      - description: flag to get data for all campaigns under that account
        in: query
        name: all_campaigns
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotalsAccount'
          description: 200 valid response
      security:
      - shadowfax-api-authorizer: []
      summary: Get account level cumulative data.
      x-amazon-apigateway-integration:
        contentHandling: CONVERT_TO_TEXT
        httpMethod: POST
        passthroughBehavior: when_no_match
        responses:
          default:
            statusCode: 200
        type: aws_proxy
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
  /demand/v1/adgroup/{adgroupID}/daily:
    get:
      description: Get adgroup level daily data.
      tags:
      - demand
      parameters:
      - in: header
        name: X-GT-USER-ID
        required: true
        schema:
          type: string
      - in: header
        name: X-GT-API-KEY
        required: true
        schema:
          type: string
      - description: request adgroup
        in: path
        name: adgroupID
        required: true
        schema:
          format: int64
          type: integer
      - description: start date for data pull.
        in: query
        name: start_date
        required: true
        schema:
          type: string
      - description: end date for data pull
        in: query
        name: end_date
        required: true
        schema:
          type: string
      - description: flag to get data for all creatives under that adgroup
        in: query
        name: all_creatives
        required: false
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DailyAdgroup'
          description: 200 valid response
      security:
      - shadowfax-api-authorizer: []
      summary: Get adgroup level daily data.
      x-amazon-apigateway-integration:
        contentHandling: CONVERT_TO_TEXT
        httpMethod: POST
        passthroughBehavior: when_no_match
        responses:
          default:
            statusCode: 200
        type: aws_proxy
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
  /demand/v1/adgroup/{adgroupID}/totals:
    get:
      description: Get adgroup level cumulative data.
      tags:
      - demand
      parameters:
      - in: header
        name: X-GT-USER-ID
        required: true
        schema:
          type: string
      - in: header
        name: X-GT-API-KEY
        required: true
        schema:
          type: string
      - description: request adgroup id
        in: path
        name: adgroupID
        required: true
        schema:
          format: int64
          type: integer
      - description: start date for data pull.
        in: query
        name: start_date
        required: false
        schema:
          type: string
      - description: end date for data pull
        in: query
        name: end_date
        required: false
        schema:
          type: string
      - description: flag to get data for all creatives under that adgroup
        in: query
        name: all_creatives
        required: false
        schema:
          format: int64
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotalsAdgroup'
          description: 200 valid response
      security:
      - shadowfax-api-authorizer: []
      summary: Get adgroup level cumulative data.
      x-amazon-apigateway-integration:
        contentHandling: CONVERT_TO_TEXT
        httpMethod: POST
        passthroughBehavior: when_no_match
        responses:
          default:
            statusCode: 200
        type: aws_proxy
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
  /demand/v1/campaign/{campaignID}/daily:
    get:
      description: Get campaign level daily data.
      tags:
      - demand
      parameters:
      - in: header
        name: X-GT-USER-ID
        required: true
        schema:
          type: string
      - in: header
        name: X-GT-API-KEY
        required: true
        schema:
          type: string
      - description: request campaign id
        in: path
        name: campaignID
        required: true
        schema:
          format: int64
          type: integer
      - description: start date for data pull.
        in: query
        name: start_date
        required: true
        schema:
          type: string
      - description: end date for data pull
        in: query
        name: end_date
        required: true
        schema:
          type: string
      - description: flag to get data for all adgroups under that campaign
        in: query
        name: all_adgroups
        required: false
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DailyCampaign'
          description: 200 valid response
      security:
      - shadowfax-api-authorizer: []
      summary: Get campaign level daily data.
      x-amazon-apigateway-integration:
        contentHandling: CONVERT_TO_TEXT
        httpMethod: POST
        passthroughBehavior: when_no_match
        responses:
          default:
            statusCode: 200
        type: aws_proxy
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
  /demand/v1/campaign/{campaignID}/totals:
    get:
      description: Get campaign level cumulative data.
      tags:
      - demand
      parameters:
      - in: header
        name: X-GT-USER-ID
        required: true
        schema:
          type: string
      - in: header
        name: X-GT-API-KEY
        required: true
        schema:
          type: string
      - description: request campaign id
        in: path
        name: campaignID
        required: true
        schema:
          format: int64
          type: integer
      - description: start date for data pull.
        in: query
        name: start_date
        required: true
        schema:
          type: string
      - description: end date for data pull
        in: query
        name: end_date
        required: true
        schema:
          type: string
      - description: flag to get data for all adgroups under that campaign
        in: query
        name: all_adgroups
        required: false
        schema:
          type: integer
      - description: flag to get data for all adgroups and creatives under that campaign
        in: query
        name: all_creatives
        required: false
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotalsCampaign'
          description: 200 valid response
      security:
      - shadowfax-api-authorizer: []
      summary: Get campaign level cumulative data.
      x-amazon-apigateway-integration:
        contentHandling: CONVERT_TO_TEXT
        httpMethod: POST
        passthroughBehavior: when_no_match
        responses:
          default:
            statusCode: 200
        type: aws_proxy
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
  /demand/v1/org/{organizationID}/totals:
    get:
      summary: Get organization level data
      description: Get organization level data
      tags:
      - demand
      parameters:
      - name: X-GT-USER-ID
        in: header
        required: true
        schema:
          type: string
      - name: X-GT-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: organizationID
        in: path
        description: request organizationID id
        required: true
        schema:
          format: int64
          type: integer
      - name: start_date
        in: query
        description: start date for data pull.
        required: true
        schema:
          type: string
      - name: end_date
        in: query
        description: end date for data pull
        required: true
        schema:
          type: string
      responses:
        '200':
          description: 200 valid response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotalsOrg'
      security:
      - shadowfax-api-authorizer: []
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
        responses:
          default:
            statusCode: 200
        passthroughBehavior: when_no_match
        httpMethod: POST
        contentHandling: CONVERT_TO_TEXT
        type: aws_proxy
  /demand/v1/campaign/product/{campaignID}:
    get:
      summary: Get product level data by campaign_id
      description: Get product level data by campaign_id
      tags:
      - demand
      parameters:
      - name: X-GT-USER-ID
        in: header
        required: true
        schema:
          type: string
      - name: X-GT-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: campaignID
        in: path
        description: request campaign id
        required: true
        schema:
          format: int64
          type: integer
      - name: start_date
        in: query
        description: start date for data pull.
        required: true
        schema:
          type: string
      - name: end_date
        in: query
        description: end date for data pull
        required: true
        schema:
          type: string
      responses:
        '200':
          description: 200 valid response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductExportCampaign'
      security:
      - shadowfax-api-authorizer: []
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
        responses:
          default:
            statusCode: 200
        passthroughBehavior: when_no_match
        httpMethod: POST
        contentHandling: CONVERT_TO_TEXT
        type: aws_proxy
  /demand/v1/adgroups/product/{campaignID}:
    get:
      summary: Get product level for all the adgroups under the campaign
      description: Get product level for all the adgroups under the campaign
      tags:
      - demand
      parameters:
      - name: X-GT-USER-ID
        in: header
        required: true
        schema:
          type: string
      - name: X-GT-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: campaignID
        in: path
        description: request campaign id
        required: true
        schema:
          format: int64
          type: integer
      - name: start_date
        in: query
        description: start date for data pull.
        required: true
        schema:
          type: string
      - name: end_date
        in: query
        description: end date for data pull
        required: true
        schema:
          type: string
      responses:
        '200':
          description: 200 valid response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductExportAdgroup'
      security:
      - shadowfax-api-authorizer: []
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
        responses:
          default:
            statusCode: 200
        passthroughBehavior: when_no_match
        httpMethod: POST
        contentHandling: CONVERT_TO_TEXT
        type: aws_proxy
  /demand/v1/creatives/product/{campaignID}:
    get:
      summary: Get product level for all the creatives under the campaign
      description: Get product level for all the creatives under the campaign
      tags:
      - demand
      parameters:
      - name: X-GT-USER-ID
        in: header
        required: true
        schema:
          type: string
      - name: X-GT-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: campaignID
        in: path
        description: request campaign id
        required: true
        schema:
          format: int64
          type: integer
      - name: start_date
        in: query
        description: start date for data pull.
        required: true
        schema:
          type: string
      - name: end_date
        in: query
        description: end date for data pull
        required: true
        schema:
          type: string
      responses:
        '200':
          description: 200 valid response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductExportCreative'
      security:
      - shadowfax-api-authorizer: []
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
        responses:
          default:
            statusCode: 200
        passthroughBehavior: when_no_match
        httpMethod: POST
        contentHandling: CONVERT_TO_TEXT
        type: aws_proxy
  /demand/v1/campaign/locations/{campaignID}:
    get:
      summary: Get Location data
      description: Get Location data
      tags:
      - demand
      parameters:
      - name: X-GT-USER-ID
        in: header
        required: true
        schema:
          type: string
      - name: X-GT-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: campaignID
        in: path
        description: request campaign id
        required: true
        schema:
          format: int64
          type: integer
      - name: start_date
        in: query
        description: start date for data pull.
        required: true
        schema:
          type: string
      - name: end_date
        in: query
        description: end date for data pull
        required: true
        schema:
          type: string
      - name: location_type
        in: query
        description: flag to get data for the campaign by location_type
        required: true
        schema:
          type: string
          enum:
          - state
          - dma
          - zipcode
          - county
      - name: metric
        in: query
        description: flag to get the data sorted by given metric, default is impressions
        required: false
        schema:
          type: string
          enum:
          - impressions
          - clicks
          - ctr
          - secondary_actions
          - visits
      - name: key
        in: query
        description: set to 1 to get top 10 records descending by given metric, set to 2 to get top 10 records ascending by given metric, set to 0 for all records with ascending ordering by given metric.
        required: false
        schema:
          format: int64
          type: integer
          enum:
          - 0
          - 1
          - 2
      responses:
        '200':
          description: 200 valid response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationCampaign'
      security:
      - shadowfax-api-authorizer: []
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
        responses:
          default:
            statusCode: 200
        passthroughBehavior: when_no_match
        httpMethod: POST
        contentHandling: CONVERT_TO_TEXT
        type: aws_proxy
  /demand/v1/adgroup/locations/{adgroupID}:
    get:
      summary: Get Location data
      description: Get Location data
      tags:
      - demand
      parameters:
      - name: X-GT-USER-ID
        in: header
        required: true
        schema:
          type: string
      - name: X-GT-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: adgroupID
        in: path
        description: request adgroup id
        required: true
        schema:
          format: int64
          type: integer
      - name: start_date
        in: query
        description: start date for data pull.
        required: true
        schema:
          type: string
      - name: end_date
        in: query
        description: end date for data pull
        required: true
        schema:
          type: string
      - name: location_type
        in: query
        description: flag to get data for the campaign by location_type
        required: true
        schema:
          type: string
          enum:
          - state
          - dma
          - zipcode
          - county
      - name: metric
        in: query
        description: flag to get the data sorted by given metric, default is impressions
        required: false
        schema:
          type: string
          enum:
          - impressions
          - clicks
          - ctr
          - secondary_actions
          - visits
      - name: key
        in: query
        description: set to 1 to get top 10 records descending by given metric, set to 2 to get top 10 records ascending by given metric, set to 0 for all records with ascending ordering by given metric.
        required: false
        schema:
          format: int64
          type: integer
          enum:
          - 0
          - 1
          - 2
      responses:
        '200':
          description: 200 valid response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationAdgroup'
      security:
      - shadowfax-api-authorizer: []
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
        responses:
          default:
            statusCode: 200
        passthroughBehavior: when_no_match
        httpMethod: POST
        contentHandling: CONVERT_TO_TEXT
        type: aws_proxy
  /demand/v1/campaign/sv_locations/{campaignID}:
    get:
      summary: Get SV Location data
      description: Get SV Location data
      tags:
      - demand
      parameters:
      - name: X-GT-USER-ID
        in: header
        required: true
        schema:
          type: string
      - name: X-GT-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: campaignID
        in: path
        description: request campaign id
        required: true
        schema:
          format: int64
          type: integer
      - name: start_date
        in: query
        description: start date for data pull.
        required: true
        schema:
          type: string
      - name: end_date
        in: query
        description: end date for data pull
        required: true
        schema:
          type: string
      - name: location_type
        in: query
        description: flag to get data for the campaign by location_type
        required: true
        schema:
          type: string
          enum:
          - state
          - dma
          - zipcode
          - address
      - name: key
        in: query
        description: set to 1 to get top 10 records descending by total_sv, set to 2 to get top 10 records ascending by total_sv, set to 0 for all records with ascending ordering by total_sv.
        required: false
        schema:
          format: int64
          type: integer
          enum:
          - 0
          - 1
          - 2
      responses:
        '200':
          description: 200 valid response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SVLocationCampaign'
      security:
      - shadowfax-api-authorizer: []
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
        responses:
          default:
            statusCode: 200
        passthroughBehavior: when_no_match
        httpMethod: POST
        contentHandling: CONVERT_TO_TEXT
        type: aws_proxy
  /demand/v1/adgroup/sv_locations/{adgroupID}:
    get:
      summary: Get SV Location data
      description: Get SV Location data
      tags:
      - demand
      parameters:
      - name: X-GT-USER-ID
        in: header
        required: true
        schema:
          type: string
      - name: X-GT-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: adgroupID
        in: path
        description: request adgroup id
        required: true
        schema:
          format: int64
          type: integer
      - name: start_date
        in: query
        description: start date for data pull.
        required: true
        schema:
          type: string
      - name: end_date
        in: query
        description: end date for data pull
        required: true
        schema:
          type: string
      - name: location_type
        in: query
        description: flag to get data for the campaign by location_type
        required: true
        schema:
          enum:
          - state
          - dma
          - zipcode
          - address
          type: string
      - name: key
        in: query
        description: set to 1 to get top 10 records descending by total_sv, set to 2 to get top 10 records ascending by total_sv, set to 0 for all records with ascending ordering by total_sv.
        required: false
        schema:
          format: int64
          type: integer
          enum:
          - 0
          - 1
          - 2
      responses:
        '200':
          description: 200 valid response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SVLocationAdgroup'
      security:
      - shadowfax-api-authorizer: []
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
        responses:
          default:
            statusCode: 200
        passthroughBehavior: when_no_match
        httpMethod: POST
        contentHandling: CONVERT_TO_TEXT
        type: aws_proxy
  /demand/v1/org/account_count/{tenantID}:
    get:
      summary: Get count of accounts
      description: Get count of accounts
      tags:
      - demand
      parameters:
      - name: X-GT-USER-ID
        in: header
        required: true
        schema:
          type: string
      - name: X-GT-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: tenantID
        in: path
        description: request tenantID
        required: true
        schema:
          format: int64
          type: integer
      responses:
        '200':
          description: 200 valid response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountCount'
      security:
      - shadowfax-api-authorizer: []
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
        responses:
          default:
            statusCode: 200
        passthroughBehavior: when_no_match
        httpMethod: POST
        contentHandling: CONVERT_TO_TEXT
        type: aws_proxy
  /demand/v1/account/conversion_tracking/{accountID}:
    get:
      summary: Get conversion tracking for all the adgroups under the account
      description: Get conversion tracking for all the adgroups under the account
      tags:
      - demand
      parameters:
      - name: X-GT-USER-ID
        in: header
        required: true
        schema:
          type: string
      - name: X-GT-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: accountID
        in: path
        description: request accountID
        required: true
        schema:
          format: int64
          type: integer
      - name: start_date
        in: query
        description: start date for data pull.
        required: true
        schema:
          type: string
      - name: end_date
        in: query
        description: end date for data pull
        required: true
        schema:
          type: string
      responses:
        '200':
          description: 200 valid response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversionTracking'
      security:
      - shadowfax-api-authorizer: []
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
        responses:
          default:
            statusCode: 200
        passthroughBehavior: when_no_match
        httpMethod: POST
        contentHandling: CONVERT_TO_TEXT
        type: aws_proxy
  /demand/v1/creatives/{campaignID}/daily:
    get:
      summary: Get creative level data under the campaign
      description: Get creative level data under the campaign
      tags:
      - demand
      parameters:
      - name: X-GT-USER-ID
        in: header
        required: true
        schema:
          type: string
      - name: X-GT-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: campaignID
        in: path
        description: request campaignID
        required: true
        schema:
          format: int64
          type: integer
      - name: start_date
        in: query
        description: start date for data pull.
        required: true
        schema:
          type: string
      - name: end_date
        in: query
        description: end date for data pull
        required: true
        schema:
          type: string
      responses:
        '200':
          description: 200 valid response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DailyExportCreatives'
      security:
      - shadowfax-api-authorizer: []
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
      x-amazon-apigateway-integration:
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
        responses:
          default:
            statusCode: 200
        passthroughBehavior: when_no_match
        httpMethod: POST
        contentHandling: CONVERT_TO_TEXT
        type: aws_proxy
  /demand/v1/campaign/behavioral_audience/{campaignID}:
    get:
      description: Get campaign level behavioral_audience  data under the campaign
      tags:
      - demand
      parameters:
      - in: header
        name: X-GT-USER-ID
        required: true
        schema:
          type: string
      - in: header
        name: X-GT-API-KEY
        required: true
        schema:
          type: string
      - description: request campaignID
        in: path
        name: campaignID
        required: true
        schema:
          format: int64
          type: integer
      - description: start date for data pull.
        in: query
        name: start_date
        required: true
        schema:
          type: string
      - description: end date for data pull
        in: query
        name: end_date
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BehavioralAudienceCampaign'
          description: 200 valid response
      security:
      - shadowfax-api-authorizer: []
      summary: Get campaign level behavioral_audience  data under the campaign
      x-amazon-apigateway-integration:
        contentHandling: CONVERT_TO_TEXT
        httpMethod: POST
        passthroughBehavior: when_no_match
        responses:
          default:
            statusCode: 200
        type: aws_proxy
        uri:
          Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ShadowfaxIntegrationFunction.Arn}/invocations
      x-amazon-apigateway-request-validator: Validate query string parameters and headers
  /demand/v1/adgroups/behavioral_audience/{campaignID}:
    get:
      description: Get adgroup level behavioral_audience data under the campaign.
      tags:
      - demand
      parameters:
      - in: header
        name: X-GT-USER-ID
        required: true
        schema:
          type: string
      - in: header
        name: X-GT-API-KEY
        required: true
        schema:
          type: string
      - description: request campaignID
        in: path
        name: campaignID
        required: true
        schema:
          format: int64
          type: integer
      - description: start date for data pull.
        in: qu

# --- truncated at 32 KB (162 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/groundtruth/refs/heads/main/openapi/groundtruth-demand-api-openapi.yml