Elexon Margin Forecast API

Generating Plant Operating Margin forecast data, including historical views of data by publish time or forecast date.

Operations 6

GET /forecast/margin/daily Daily margin forecast (OCNMFD2) #
GET /forecast/margin/daily/history Historical daily margin forecast (OCNMFD2) #
GET /forecast/margin/daily/evolution Evolution daily margin forecast (OCNMFD2) #
GET /forecast/margin/weekly Weekly margin forecast (OCNMFW2, OCNMF3Y2) #
GET /forecast/margin/weekly/history Historical weekly margin forecast (OCNMFW2, OCNMF3Y2) #
GET /forecast/margin/weekly/evolution Evolution daily margin forecast (OCNMFW2, OCNMF3Y2) #

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/elexon-margin-forecast-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

elexon-margin-forecast-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Insights.Api Margin Forecast API
  version: '1.0'
  description: Generating Plant Operating Margin forecast data, including historical views of data by publish time or forecast date.
servers:
- url: https://data.elexon.co.uk/bmrs/api/v1
tags:
- name: Margin Forecast
  description: Generating Plant Operating Margin forecast data, including historical views of data by publish time or forecast date.
paths:
  /forecast/margin/daily:
    get:
      tags:
      - Margin Forecast
      summary: Daily margin forecast (OCNMFD2)
      description: 'This endpoint provides the Generating Plant Operating Margin covering 2 days ahead to 14 days ahead

        in MW values. The Daily API outputs the latest published data for daily margin forecast for D+2 t D+14'
      parameters:
      - name: format
        in: query
        description: Response data format. Use json/xml to include metadata.
        schema:
          enum:
          - json
          - xml
          - csv
          type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            application/json:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            text/json:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            application/xml:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            text/xml:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            text/csv:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
      operationId: getForecastMarginDaily
      x-operation-id-source: derived
  /forecast/margin/daily/history:
    get:
      tags:
      - Margin Forecast
      summary: Historical daily margin forecast (OCNMFD2)
      description: 'This endpoint provides the historic Generating Plant Operating Margin covering 2 days ahead to 14 days ahead in MW values.

        The historic API outputs the latest published data for historic daily margin forecast for D+2 to D+14'
      parameters:
      - name: publishTime
        in: query
        required: true
        schema:
          type: string
          format: date-time
      - name: format
        in: query
        description: Response data format. Use json/xml to include metadata.
        schema:
          enum:
          - json
          - xml
          - csv
          type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            application/json:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            text/json:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            application/xml:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            text/xml:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            text/csv:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
      operationId: getForecastMarginDailyHistory
      x-operation-id-source: derived
  /forecast/margin/daily/evolution:
    get:
      tags:
      - Margin Forecast
      summary: Evolution daily margin forecast (OCNMFD2)
      description: 'This endpoint provides the daily evolution Generating Plant Operating Margin covering 2 days ahead to 14 days ahead in MW values.

        The Daily API outputs the latest published data for daily margin forecast for D+2 to D+14.


        Date parameter must be provided in the exact format yyyy-MM-dd.'
      parameters:
      - name: forecastDate
        in: query
        description: The forecast date for the filter. This must be in the format yyyy-MM-dd.
        required: true
        schema:
          type: string
          format: date
          example: '2022-09-20'
        example: '2022-09-20'
      - name: format
        in: query
        description: Response data format. Use json/xml to include metadata.
        schema:
          enum:
          - json
          - xml
          - csv
          type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            application/json:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            text/json:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            application/xml:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            text/xml:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
            text/csv:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
      operationId: getForecastMarginDailyEvolution
      x-operation-id-source: derived
  /forecast/margin/weekly:
    get:
      tags:
      - Margin Forecast
      summary: Weekly margin forecast (OCNMFW2, OCNMF3Y2)
      description: 'This endpoint provides the Generating Plant Operating Margin covering 2 weeks ahead to 156 weeks ahead in MW values.

        The weekly API outputs the latest published data for weekly margin forecast for W+2 to W+156'
      parameters:
      - name: range
        in: query
        schema:
          enum:
          - 52W
          - 156W
          type: string
      - name: format
        in: query
        description: Response data format. Use json/xml to include metadata.
        schema:
          enum:
          - json
          - xml
          - csv
          type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            application/json:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            text/json:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            application/xml:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            text/xml:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            text/csv:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
      operationId: getForecastMarginWeekly
      x-operation-id-source: derived
  /forecast/margin/weekly/history:
    get:
      tags:
      - Margin Forecast
      summary: Historical weekly margin forecast (OCNMFW2, OCNMF3Y2)
      description: 'This endpoint provides the weekly historic Generating Plant Operating Margin.

        This historic API output 2 weeks ahead to 156 weeks ahead in MW values'
      parameters:
      - name: publishTime
        in: query
        required: true
        schema:
          type: string
          format: date-time
      - name: range
        in: query
        schema:
          enum:
          - 52W
          - 156W
          type: string
      - name: format
        in: query
        description: Response data format. Use json/xml to include metadata.
        schema:
          enum:
          - json
          - xml
          - csv
          type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            application/json:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            text/json:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            application/xml:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            text/xml:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            text/csv:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
      operationId: getForecastMarginWeeklyHistory
      x-operation-id-source: derived
  /forecast/margin/weekly/evolution:
    get:
      tags:
      - Margin Forecast
      summary: Evolution daily margin forecast (OCNMFW2, OCNMF3Y2)
      description: 'This endpoint provides the daily evolution Generating Plant Operating Margin covering 2 days ahead to 14 days ahead in MW values.

        The Daily API outputs the latest published data for daily margin forecast for D+2 t D+14'
      parameters:
      - name: year
        in: query
        required: true
        schema:
          type: integer
          format: int32
      - name: week
        in: query
        required: true
        schema:
          type: integer
          format: int32
      - name: range
        in: query
        schema:
          enum:
          - 52W
          - 156W
          type: string
      - name: format
        in: query
        description: Response data format. Use json/xml to include metadata.
        schema:
          enum:
          - json
          - xml
          - csv
          type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            application/json:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            text/json:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            application/xml:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            text/xml:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
            text/csv:
              schema:
                $ref: '#/components/schemas/Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
      operationId: getForecastMarginWeeklyEvolution
      x-operation-id-source: derived
components:
  schemas:
    Insights.Api.Models.Metadata.ApiResponseSourceMetadata:
      type: object
      properties:
        datasets:
          type:
          - array
          - 'null'
          items:
            type: string
          example:
          - DATASET
      additionalProperties: false
    Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly:
      type: object
      properties:
        data:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly'
        metadata:
          $ref: '#/components/schemas/Insights.Api.Models.Metadata.ApiResponseSourceMetadata'
      additionalProperties: false
    Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily:
      type: object
      properties:
        publishTime:
          type: string
          format: date-time
        margin:
          type:
          - integer
          - 'null'
          format: int64
        forecastDate:
          type: string
          format: date
      additionalProperties: false
    Insights.Api.Models.Responses.ResponseWithMetadata-1_Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily:
      type: object
      properties:
        data:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Insights.Api.Models.Responses.ForecastMargin.ForecastMarginDaily'
        metadata:
          $ref: '#/components/schemas/Insights.Api.Models.Metadata.ApiResponseSourceMetadata'
      additionalProperties: false
    Insights.Api.Models.Responses.ForecastMargin.ForecastMarginWeekly:
      type: object
      properties:
        publishTime:
          type: string
          format: date-time
        margin:
          type:
          - integer
          - 'null'
          format: int64
        week:
          type: integer
          format: int32
        year:
          type: integer
          format: int32
        weekStartDate:
          type: string
          format: date
      additionalProperties: false