openapi: 3.2.0 info: title: Terna Public API version: '2026-09-23' description: 'GENERATED FROM DOCUMENTATION by API Evangelist on 2026-09-23: 10 operation(s) read from 35 public documentation page(s) (each operation names its page in x-source). This is not the provider''s published contract; Terna has published no machine-readable contract that the pipeline could find. Engine: local.' x-evidence-tiers: code-example: 40 documentation: -30 pages-with-code: 35 pages-read: 35 x-generated-from: documentation x-provenance: generated x-authored-by: API Evangelist x-generated: '2026-09-23' x-generator: generate-contract-from-docs.py x-engine: local x-sources: - https://developer.terna.it/docs/read/Access_Token - https://developer.terna.it/docs/read/How_to_make_a_request - https://developer.terna.it/docs/apis_catalog/market/Aste_FCR - https://developer.terna.it/docs/read/apis_catalog/load/Total - https://developer.terna.it/docs/read/apis_catalog/load/Market - https://developer.terna.it/docs/read/apis_catalog/market/Costs - https://developer.terna.it/docs/read/apis_catalog/market/Prices - https://developer.terna.it/docs/read/apis_catalog/load/Total_Load - https://developer.terna.it/docs/read/apis_catalog/market/Aste_FCR - https://developer.terna.it/docs/read/apis_catalog/market/Quantity - https://developer.terna.it/docs/read/apis_catalog/load/Market_Load - https://developer.terna.it/docs/read/apis_catalog/fees/Daily_Prices - https://developer.terna.it/docs/read/apis_catalog/generation/Hydric - https://developer.terna.it/docs/read/apis_catalog/fees/Monthly_Summary - https://developer.terna.it/docs/read/apis_catalog/fees/Zonal_Exchanges - https://developer.terna.it/docs/read/apis_catalog/load/Industry_Sector - https://developer.terna.it/docs/read/apis_catalog/load/PeakValley_Load - https://developer.terna.it/docs/read/apis_catalog/load/Services_Sector - https://developer.terna.it/docs/read/apis_catalog/market/Load_Forecast - https://developer.terna.it/docs/read/apis_catalog/market/Transit_Limits - https://developer.terna.it/docs/read/apis_catalog/market/Accepted_Offers - https://developer.terna.it/docs/read/apis_catalog/market/Transit_Margins - https://developer.terna.it/docs/read/apis_catalog/fees/Preliminary_Prices - https://developer.terna.it/docs/read/apis_catalog/market/Submitted_Offers - https://developer.terna.it/docs/apis_catalog/market/Forecast_Transit_Limits - https://developer.terna.it/docs/read/apis_catalog/generation/Energy_Balance - https://developer.terna.it/docs/read/apis_catalog/generation/Actual_Generation - https://developer.terna.it/docs/read/apis_catalog/generation/Generation_Plants - https://developer.terna.it/docs/read/apis_catalog/load/PeakValley_Load_Details - https://developer.terna.it/docs/read/apis_catalog/generation/Installed_Capacity - https://developer.terna.it/docs/read/apis_catalog/fees/Commercial_Balance_Prices - https://developer.terna.it/docs/read/apis_catalog/generation/Thermoelectric_Heat - https://developer.terna.it/docs/read/apis_catalog/load/Demand_coverage_by_source - https://developer.terna.it/docs/read/apis_catalog/load/electrical_energy_by_type - https://developer.terna.it/docs/read/apis_catalog/market/Forecast_Transit_Limits servers: - url: https://api.terna.it security: - apiKey: [] tags: - name: Public API paths: /public-api/access-token: get: operationId: get_public_api_access_token tags: - Public API summary: GET /public-api/access-token x-source: https://developer.terna.it/docs/read/How_to_make_a_request responses: '200': description: Success (status as documented) x-evidence: kind: code-example language: curl snippet: "curl --location 'https://api.terna.it/public-api/access-token' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=client_credentials' --data-urlencode 'client_id=your_API_Key' --data-urlencode 'client_secret=your_API_Secret'\n Calling our APIs \n JavaScript - Fetch \nvar myHeaders = new Headers();\nmyHeaders.append(\"Authorization\", \"Bearer n3fujtnubkgx48rhvcf7y" post: operationId: post_public_api_access_token tags: - Public API summary: POST /public-api/access-token x-source: https://developer.terna.it/docs/read/Access_Token responses: '201': description: Success (shape read from the example response on the page) content: application/json: schema: $ref: '#/components/schemas/PostPublicApiAccessTokenResponse' x-evidence: kind: code-example language: curl snippet: "curl -H \"Content-Type: application/x-www-form-urlencoded\" \"https://api.terna.it/public-api/access-token\" -X POST -d \"client_id=5d4rscEcpyxywu4jdoiWerhsl\" -d \"client_secret=Iy4c6tuErp\" -d \"grant_type=client_credentials\"\n Definition of the response structure \n Key Description \n access_token \n  Your new Access Token \n token_type \n  We use Bearer token \n expires_in \n The number of second before the to" components: schemas: PostPublicApiAccessTokenResponse: type: object properties: access_token: type: string token_type: type: string expires_in: type: integer securitySchemes: apiKey: type: apiKey in: header name: Authorization