TransportAPI · Capability

TransportAPI — Journey Planner

TransportAPI — Journey Planner. 1 operations. Lead operation: Plan Journey. Self-contained Naftiko capability covering one Transportapi business surface.

Run with Naftiko TransportapiJourney Planner

What You Can Do

GET
Planjourney — Plan Journey
/v1/journey/from/{from-coords}/to/to-coords-json

MCP Tools

plan-journey

Plan Journey

read-only idempotent

Capability Spec

transportapi-journey-planner.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: TransportAPI — Journey Planner
  description: 'TransportAPI — Journey Planner. 1 operations. Lead operation: Plan Journey. Self-contained Naftiko capability
    covering one Transportapi business surface.'
  tags:
  - Transportapi
  - Journey Planner
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TRANSPORTAPI_API_KEY: TRANSPORTAPI_API_KEY
capability:
  consumes:
  - type: http
    namespace: transportapi-journey-planner
    baseUri: https://transportapi.com/v3/uk
    description: TransportAPI — Journey Planner business capability. Self-contained, no shared references.
    resources:
    - name: journey-from-from_coords-to-to_coords}.json
      path: /journey/from/{from_coords}/to/{to_coords}.json
      operations:
      - name: planjourney
        method: GET
        description: Plan Journey
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: from_coords
          in: path
          type: string
          description: Origin coordinates as lat,lon or ATCO/CRS code
          required: true
        - name: to_coords
          in: path
          type: string
          description: Destination coordinates as lat,lon or ATCO/CRS code
          required: true
        - name: service
          in: query
          type: string
          description: Journey planning service/engine to use
        - name: modes
          in: query
          type: string
          description: Comma-separated transport modes to include
        - name: date
          in: query
          type: string
          description: Journey date (YYYY-MM-DD)
        - name: time
          in: query
          type: string
          description: Journey time (HH:MM)
        - name: time_is
          in: query
          type: string
          description: Whether time is departure or arrival
        - name: app_id
          in: query
          type: string
        - name: app_key
          in: query
          type: string
    authentication:
      type: apikey
      key: X-App-Id
      value: '{{env.TRANSPORTAPI_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: transportapi-journey-planner-rest
    port: 8080
    description: REST adapter for TransportAPI — Journey Planner. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/journey/from/{from-coords}/to/to-coords-json
      name: journey-from-from-coords-to-to-coords-json
      description: REST surface for journey-from-from_coords-to-to_coords}.json.
      operations:
      - method: GET
        name: planjourney
        description: Plan Journey
        call: transportapi-journey-planner.planjourney
        with:
          from_coords: rest.from_coords
          to_coords: rest.to_coords
          service: rest.service
          modes: rest.modes
          date: rest.date
          time: rest.time
          time_is: rest.time_is
          app_id: rest.app_id
          app_key: rest.app_key
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: transportapi-journey-planner-mcp
    port: 9090
    transport: http
    description: MCP adapter for TransportAPI — Journey Planner. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: plan-journey
      description: Plan Journey
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: transportapi-journey-planner.planjourney
      with:
        from_coords: tools.from_coords
        to_coords: tools.to_coords
        service: tools.service
        modes: tools.modes
        date: tools.date
        time: tools.time
        time_is: tools.time_is
        app_id: tools.app_id
        app_key: tools.app_key
      outputParameters:
      - type: object
        mapping: $.