The Racing API · Capability

The Racing API — Basic Plan

The Racing API — Basic Plan. 7 operations. Lead operation: The Racing API Courses. Self-contained Naftiko capability covering one The Racing Api business surface.

Run with Naftiko The Racing ApiBasic Plan

What You Can Do

GET
Coursesv1coursesget — The Racing API Courses
/v1/v1/courses
GET
Regionsv1coursesregionsget — The Racing API Regions
/v1/v1/courses/regions
GET
Horsedistancetimeanalysisv1horseshorseidanalysisdistancetimesget — The Racing API Horse Distance Time Analysis
/v1/v1/horses/{horse-id}/analysis/distance-times
GET
Racecardsbasicv1racecardsbasicget — The Racing API Racecards Basic
/v1/v1/racecards/basic
GET
Racecardssummariesv1racecardssummariesget — The Racing API Racecards Summaries
/v1/v1/racecards/summaries
GET
Racecardhorseresultsv1racecardshorseidresultsget — The Racing API Racecard Horse Results
/v1/v1/racecards/{horse-id}/results
GET
Resultstodayv1resultstodayget — The Racing API Results Today
/v1/v1/results/today

MCP Tools

racing-api-courses

The Racing API Courses

read-only idempotent
racing-api-regions

The Racing API Regions

read-only idempotent
racing-api-horse-distance-time

The Racing API Horse Distance Time Analysis

read-only idempotent
racing-api-racecards-basic

The Racing API Racecards Basic

read-only idempotent
racing-api-racecards-summaries

The Racing API Racecards Summaries

read-only idempotent
racing-api-racecard-horse-results

The Racing API Racecard Horse Results

read-only idempotent
racing-api-results-today

The Racing API Results Today

read-only idempotent

Capability Spec

the-racing-basic-plan.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: The Racing API — Basic Plan
  description: 'The Racing API — Basic Plan. 7 operations. Lead operation: The Racing API Courses. Self-contained Naftiko
    capability covering one The Racing Api business surface.'
  tags:
  - The Racing Api
  - Basic Plan
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    THE_RACING_API_API_KEY: THE_RACING_API_API_KEY
capability:
  consumes:
  - type: http
    namespace: the-racing-basic-plan
    baseUri: https://api.theracingapi.com
    description: The Racing API — Basic Plan business capability. Self-contained, no shared references.
    resources:
    - name: v1-courses
      path: /v1/courses
      operations:
      - name: coursesv1coursesget
        method: GET
        description: The Racing API Courses
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: region_codes
          in: query
          type: string
          description: Filter courses by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'
    - name: v1-courses-regions
      path: /v1/courses/regions
      operations:
      - name: regionsv1coursesregionsget
        method: GET
        description: The Racing API Regions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v1-horses-horse_id-analysis-distance-times
      path: /v1/horses/{horse_id}/analysis/distance-times
      operations:
      - name: horsedistancetimeanalysisv1horseshorseidanalysisdistancetimesget
        method: GET
        description: The Racing API Horse Distance Time Analysis
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: horse_id
          in: path
          type: string
          required: true
        - name: start_date
          in: query
          type: string
          description: <p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>
        - name: end_date
          in: query
          type: string
          description: <p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>
        - name: region
          in: query
          type: string
          description: <p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here<
        - name: course
          in: query
          type: string
          description: Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.
        - name: type
          in: query
          type: string
          description: '<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>'
        - name: going
          in: query
          type: string
          description: '<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>,
            <code>good_to_soft</code>, <code>good_to_yi'
        - name: race_class
          in: query
          type: string
          description: '<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>,
            <code>class_4</code>, <code>class_5</code>, <code>class_6</co'
        - name: min_distance_y
          in: query
          type: string
          description: <p>Query by minimum race distance (yards)</p>
        - name: max_distance_y
          in: query
          type: string
          description: <p>Query by maximum race distance (yards)</p>
        - name: age_band
          in: query
          type: string
          description: '<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>,
            <code>3-4yo</code>, <code>3-5yo</code>, <code>3'
        - name: sex_restriction
          in: query
          type: string
          description: '<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>,
            <code>m</code>, <code>m&g</code></p>'
    - name: v1-racecards-basic
      path: /v1/racecards/basic
      operations:
      - name: racecardsbasicv1racecardsbasicget
        method: GET
        description: The Racing API Racecards Basic
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: day
          in: query
          type: string
          description: Query racecards by day:<br> today, tomorrow
        - name: region_codes
          in: query
          type: string
          description: <p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here<
        - name: course_ids
          in: query
          type: string
          description: Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.
        - name: limit
          in: query
          type: string
        - name: skip
          in: query
          type: string
    - name: v1-racecards-summaries
      path: /v1/racecards/summaries
      operations:
      - name: racecardssummariesv1racecardssummariesget
        method: GET
        description: The Racing API Racecards Summaries
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: date
          in: query
          type: string
          description: Query racecard summaries by date with format YYYY-MM-DD (e.g 2023-04-05)
        - name: region_codes
          in: query
          type: string
          description: <p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here<
        - name: course_ids
          in: query
          type: string
          description: Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.
    - name: v1-racecards-horse_id-results
      path: /v1/racecards/{horse_id}/results
      operations:
      - name: racecardhorseresultsv1racecardshorseidresultsget
        method: GET
        description: The Racing API Racecard Horse Results
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: horse_id
          in: path
          type: string
          required: true
        - name: start_date
          in: query
          type: string
          description: <p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>
        - name: end_date
          in: query
          type: string
          description: <p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>
        - name: region
          in: query
          type: string
          description: <p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here<
        - name: course
          in: query
          type: string
          description: Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.
        - name: type
          in: query
          type: string
          description: '<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>'
        - name: going
          in: query
          type: string
          description: '<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>,
            <code>good_to_soft</code>, <code>good_to_yi'
        - name: race_class
          in: query
          type: string
          description: '<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>,
            <code>class_4</code>, <code>class_5</code>, <code>class_6</co'
        - name: min_distance_y
          in: query
          type: string
          description: <p>Query by minimum race distance (yards)</p>
        - name: max_distance_y
          in: query
          type: string
          description: <p>Query by maximum race distance (yards)</p>
        - name: age_band
          in: query
          type: string
          description: '<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>,
            <code>3-4yo</code>, <code>3-5yo</code>, <code>3'
        - name: sex_restriction
          in: query
          type: string
          description: '<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>,
            <code>m</code>, <code>m&g</code></p>'
        - name: limit
          in: query
          type: string
        - name: skip
          in: query
          type: string
    - name: v1-results-today
      path: /v1/results/today
      operations:
      - name: resultstodayv1resultstodayget
        method: GET
        description: The Racing API Results Today
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: region
          in: query
          type: string
          description: <p>Query results by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_ge
        - name: limit
          in: query
          type: string
        - name: skip
          in: query
          type: string
    authentication:
      type: basic
      username: '{{env.THE_RACING_API_USER}}'
      password: '{{env.THE_RACING_API_PASS}}'
  exposes:
  - type: rest
    namespace: the-racing-basic-plan-rest
    port: 8080
    description: REST adapter for The Racing API — Basic Plan. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v1/courses
      name: v1-courses
      description: REST surface for v1-courses.
      operations:
      - method: GET
        name: coursesv1coursesget
        description: The Racing API Courses
        call: the-racing-basic-plan.coursesv1coursesget
        with:
          region_codes: rest.region_codes
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/courses/regions
      name: v1-courses-regions
      description: REST surface for v1-courses-regions.
      operations:
      - method: GET
        name: regionsv1coursesregionsget
        description: The Racing API Regions
        call: the-racing-basic-plan.regionsv1coursesregionsget
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/horses/{horse-id}/analysis/distance-times
      name: v1-horses-horse-id-analysis-distance-times
      description: REST surface for v1-horses-horse_id-analysis-distance-times.
      operations:
      - method: GET
        name: horsedistancetimeanalysisv1horseshorseidanalysisdistancetimesget
        description: The Racing API Horse Distance Time Analysis
        call: the-racing-basic-plan.horsedistancetimeanalysisv1horseshorseidanalysisdistancetimesget
        with:
          horse_id: rest.horse_id
          start_date: rest.start_date
          end_date: rest.end_date
          region: rest.region
          course: rest.course
          type: rest.type
          going: rest.going
          race_class: rest.race_class
          min_distance_y: rest.min_distance_y
          max_distance_y: rest.max_distance_y
          age_band: rest.age_band
          sex_restriction: rest.sex_restriction
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/racecards/basic
      name: v1-racecards-basic
      description: REST surface for v1-racecards-basic.
      operations:
      - method: GET
        name: racecardsbasicv1racecardsbasicget
        description: The Racing API Racecards Basic
        call: the-racing-basic-plan.racecardsbasicv1racecardsbasicget
        with:
          day: rest.day
          region_codes: rest.region_codes
          course_ids: rest.course_ids
          limit: rest.limit
          skip: rest.skip
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/racecards/summaries
      name: v1-racecards-summaries
      description: REST surface for v1-racecards-summaries.
      operations:
      - method: GET
        name: racecardssummariesv1racecardssummariesget
        description: The Racing API Racecards Summaries
        call: the-racing-basic-plan.racecardssummariesv1racecardssummariesget
        with:
          date: rest.date
          region_codes: rest.region_codes
          course_ids: rest.course_ids
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/racecards/{horse-id}/results
      name: v1-racecards-horse-id-results
      description: REST surface for v1-racecards-horse_id-results.
      operations:
      - method: GET
        name: racecardhorseresultsv1racecardshorseidresultsget
        description: The Racing API Racecard Horse Results
        call: the-racing-basic-plan.racecardhorseresultsv1racecardshorseidresultsget
        with:
          horse_id: rest.horse_id
          start_date: rest.start_date
          end_date: rest.end_date
          region: rest.region
          course: rest.course
          type: rest.type
          going: rest.going
          race_class: rest.race_class
          min_distance_y: rest.min_distance_y
          max_distance_y: rest.max_distance_y
          age_band: rest.age_band
          sex_restriction: rest.sex_restriction
          limit: rest.limit
          skip: rest.skip
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/results/today
      name: v1-results-today
      description: REST surface for v1-results-today.
      operations:
      - method: GET
        name: resultstodayv1resultstodayget
        description: The Racing API Results Today
        call: the-racing-basic-plan.resultstodayv1resultstodayget
        with:
          region: rest.region
          limit: rest.limit
          skip: rest.skip
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: the-racing-basic-plan-mcp
    port: 9090
    transport: http
    description: MCP adapter for The Racing API — Basic Plan. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: racing-api-courses
      description: The Racing API Courses
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: the-racing-basic-plan.coursesv1coursesget
      with:
        region_codes: tools.region_codes
      outputParameters:
      - type: object
        mapping: $.
    - name: racing-api-regions
      description: The Racing API Regions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: the-racing-basic-plan.regionsv1coursesregionsget
      outputParameters:
      - type: object
        mapping: $.
    - name: racing-api-horse-distance-time
      description: The Racing API Horse Distance Time Analysis
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: the-racing-basic-plan.horsedistancetimeanalysisv1horseshorseidanalysisdistancetimesget
      with:
        horse_id: tools.horse_id
        start_date: tools.start_date
        end_date: tools.end_date
        region: tools.region
        course: tools.course
        type: tools.type
        going: tools.going
        race_class: tools.race_class
        min_distance_y: tools.min_distance_y
        max_distance_y: tools.max_distance_y
        age_band: tools.age_band
        sex_restriction: tools.sex_restriction
      outputParameters:
      - type: object
        mapping: $.
    - name: racing-api-racecards-basic
      description: The Racing API Racecards Basic
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: the-racing-basic-plan.racecardsbasicv1racecardsbasicget
      with:
        day: tools.day
        region_codes: tools.region_codes
        course_ids: tools.course_ids
        limit: tools.limit
        skip: tools.skip
      outputParameters:
      - type: object
        mapping: $.
    - name: racing-api-racecards-summaries
      description: The Racing API Racecards Summaries
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: the-racing-basic-plan.racecardssummariesv1racecardssummariesget
      with:
        date: tools.date
        region_codes: tools.region_codes
        course_ids: tools.course_ids
      outputParameters:
      - type: object
        mapping: $.
    - name: racing-api-racecard-horse-results
      description: The Racing API Racecard Horse Results
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: the-racing-basic-plan.racecardhorseresultsv1racecardshorseidresultsget
      with:
        horse_id: tools.horse_id
        start_date: tools.start_date
        end_date: tools.end_date
        region: tools.region
        course: tools.course
        type: tools.type
        going: tools.going
        race_class: tools.race_class
        min_distance_y: tools.min_distance_y
        max_distance_y: tools.max_distance_y
        age_band: tools.age_band
        sex_restriction: tools.sex_restriction
        limit: tools.limit
        skip: tools.skip
      outputParameters:
      - type: object
        mapping: $.
    - name: racing-api-results-today
      description: The Racing API Results Today
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: the-racing-basic-plan.resultstodayv1resultstodayget
      with:
        region: tools.region
        limit: tools.limit
        skip: tools.skip
      outputParameters:
      - type: object
        mapping: $.