U.S. Energy Information Administration Open Data API — Petroleum

U.S. Energy Information Administration Open Data API — Petroleum. 2 operations. Lead operation: List petroleum child routes. Self-contained Naftiko capability covering one Energy Information Administration business surface.

Run with Naftiko Energy Information AdministrationPetroleum

What You Can Do

GET
Getpetroleumroutes — List petroleum child routes
/v1/petroleum
GET
Getpetroleumgasolinedieselprices — Query gasoline and diesel retail prices
/v1/petroleum/pri/gnd/data

MCP Tools

list-petroleum-child-routes

List petroleum child routes

read-only idempotent
query-gasoline-and-diesel-retail

Query gasoline and diesel retail prices

read-only idempotent

Capability Spec

open-data-petroleum.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: U.S. Energy Information Administration Open Data API — Petroleum
  description: 'U.S. Energy Information Administration Open Data API — Petroleum. 2 operations. Lead operation: List petroleum
    child routes. Self-contained Naftiko capability covering one Energy Information Administration business surface.'
  tags:
  - Energy Information Administration
  - Petroleum
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    ENERGY_INFORMATION_ADMINISTRATION_API_KEY: ENERGY_INFORMATION_ADMINISTRATION_API_KEY
capability:
  consumes:
  - type: http
    namespace: open-data-petroleum
    baseUri: https://api.eia.gov/v2
    description: U.S. Energy Information Administration Open Data API — Petroleum business capability. Self-contained, no
      shared references.
    resources:
    - name: petroleum
      path: /petroleum
      operations:
      - name: getpetroleumroutes
        method: GET
        description: List petroleum child routes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: petroleum-pri-gnd-data
      path: /petroleum/pri/gnd/data
      operations:
      - name: getpetroleumgasolinedieselprices
        method: GET
        description: Query gasoline and diesel retail prices
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: api_key
      value: '{{env.ENERGY_INFORMATION_ADMINISTRATION_API_KEY}}'
      placement: query
  exposes:
  - type: rest
    namespace: open-data-petroleum-rest
    port: 8080
    description: REST adapter for U.S. Energy Information Administration Open Data API — Petroleum. One Spectral-compliant
      resource per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/petroleum
      name: petroleum
      description: REST surface for petroleum.
      operations:
      - method: GET
        name: getpetroleumroutes
        description: List petroleum child routes
        call: open-data-petroleum.getpetroleumroutes
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/petroleum/pri/gnd/data
      name: petroleum-pri-gnd-data
      description: REST surface for petroleum-pri-gnd-data.
      operations:
      - method: GET
        name: getpetroleumgasolinedieselprices
        description: Query gasoline and diesel retail prices
        call: open-data-petroleum.getpetroleumgasolinedieselprices
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: open-data-petroleum-mcp
    port: 9090
    transport: http
    description: MCP adapter for U.S. Energy Information Administration Open Data API — Petroleum. One tool per consumed operation,
      routed inline through this capability's consumes block.
    tools:
    - name: list-petroleum-child-routes
      description: List petroleum child routes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: open-data-petroleum.getpetroleumroutes
      outputParameters:
      - type: object
        mapping: $.
    - name: query-gasoline-and-diesel-retail
      description: Query gasoline and diesel retail prices
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: open-data-petroleum.getpetroleumgasolinedieselprices
      outputParameters:
      - type: object
        mapping: $.