Grid Status API Usage API

Usage and limits for the current user or organization.

OpenAPI Specification

gridstatus-api-usage-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Grid Status API Info API Usage API
  description: The Grid Status hosted API provides programmatic access to United States and Canadian electricity grid and power market data across CAISO, ERCOT, IESO, ISONE, MISO, NYISO, PJM, and SPP. Data is organized as datasets - day-ahead and real-time LMP and settlement point prices, load and load forecasts, fuel mix, ancillary services, storage, and transmission constraints - that are listed, described, and queried through a uniform interface with time-range filters, column filters, resampling, pagination, and JSON or CSV output. Authenticate with an API key from the Grid Status settings page, passed in the x-api-key header (or api_key query parameter). Grounded in the live OpenAPI 3.1 document published at https://api.gridstatus.io/openapi.json (version 1.3.0).
  version: 1.3.0
  contact:
    name: Grid Status
    url: https://www.gridstatus.io
    email: contact@gridstatus.io
servers:
- url: https://api.gridstatus.io/v1
  description: Grid Status hosted API
security:
- apiKeyHeader: []
- apiKeyQuery: []
tags:
- name: API Usage
  description: Usage and limits for the current user or organization.
paths:
  /api_usage:
    get:
      operationId: getApiUsage
      tags:
      - API Usage
      summary: Get API usage
      description: Get API usage statistics and limits for the current user or organization - plan name, rows returned limit, requests limit, rows per response limit, per-second/minute/hour rate limits, and consumption for the current billing period.
      responses:
        '200':
          description: Usage statistics and plan limits.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIUsageResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    APIUsageResponse:
      type: object
      properties:
        plan:
          type: string
        limits:
          $ref: '#/components/schemas/APIUsageLimits'
        current_period_usage:
          type: object
          properties:
            total_requests:
              type: integer
            total_api_rows_returned:
              type: integer
    APIUsageLimits:
      type: object
      properties:
        api_rows_returned_limit:
          type: integer
        api_requests_limit:
          type: integer
        api_rows_per_response_limit:
          type: integer
        per_second_api_rate_limit:
          type: integer
        per_minute_api_rate_limit:
          type: integer
        per_hour_api_rate_limit:
          type: integer
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Missing API Key.
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: API key from https://www.gridstatus.io/settings/api.
    apiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: API key passed as a query parameter (alternative to the header).