{
    "openapi": "3.1.0",
    "info": {
        "title": "greyhound racing api",
        "version": "1.0.0",
        "description": "Greyhound racing results, racecards and tracks for the UK, Ireland and Australia. Factual data only."
    },
    "servers": [
        {
            "url": "https://api.greyhoundracingapi.com"
        }
    ],
    "security": [
        {
            "apiKey": []
        },
        {
            "bearer": []
        }
    ],
    "components": {
        "securitySchemes": {
            "apiKey": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-Key"
            },
            "bearer": {
                "type": "http",
                "scheme": "bearer"
            }
        }
    },
    "externalDocs": {
        "url": "https://greyhoundracingapi.com/documentation"
    },
    "paths": {
        "/v1/results/yesterday": {
            "get": {
                "operationId": "results_yesterday",
                "summary": "Yesterday's results",
                "description": "Yesterday's results, every meeting.",
                "externalDocs": {
                    "url": "https://greyhoundracingapi.com/documentation/results-yesterday"
                },
                "x-plans": [
                    "free",
                    "race",
                    "archive"
                ],
                "x-mcp-tool": "yesterdays_results",
                "parameters": [
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "Leave out for all three countries.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "GB",
                                "IE",
                                "AU"
                            ]
                        }
                    },
                    {
                        "name": "track",
                        "in": "query",
                        "required": false,
                        "description": "A track id from Tracks, such as romford.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, from 1. 50 races a page.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "The meta.next_cursor from your last call, for the next page.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "required": false,
                        "description": "The answer format. Adding .csv to the path does the same as csv.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "json",
                                "csv"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "data and meta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {},
                                        "meta": {
                                            "type": "object"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "An error with a code. See https://greyhoundracingapi.com/documentation/errors"
                    }
                }
            }
        },
        "/v1/results/today": {
            "get": {
                "operationId": "results_today",
                "summary": "Today's results",
                "description": "Today's results as each race settles.",
                "externalDocs": {
                    "url": "https://greyhoundracingapi.com/documentation/results-today"
                },
                "x-plans": [
                    "race",
                    "archive"
                ],
                "x-mcp-tool": "todays_results",
                "parameters": [
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "Leave out for all three countries.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "GB",
                                "IE",
                                "AU"
                            ]
                        }
                    },
                    {
                        "name": "track",
                        "in": "query",
                        "required": false,
                        "description": "A track id from Tracks, such as romford.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "race",
                        "in": "query",
                        "required": false,
                        "description": "One race number at that track.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "required": false,
                        "description": "Only races settled after this time, UTC HH:MM. For polling.",
                        "schema": {
                            "type": "string",
                            "pattern": "^\\d{2}:\\d{2}$"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, from 1. 50 races a page.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "The meta.next_cursor from your last call, for the next page.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "required": false,
                        "description": "The answer format. Adding .csv to the path does the same as csv.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "json",
                                "csv"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "data and meta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {},
                                        "meta": {
                                            "type": "object"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "An error with a code. See https://greyhoundracingapi.com/documentation/errors"
                    }
                }
            }
        },
        "/v1/results": {
            "get": {
                "operationId": "results_search",
                "summary": "Results by date",
                "description": "Results on any date from 2020 on.",
                "externalDocs": {
                    "url": "https://greyhoundracingapi.com/documentation/results-search"
                },
                "x-plans": [
                    "archive"
                ],
                "x-mcp-tool": "search_results",
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": true,
                        "description": "The day you want, YYYY-MM-DD, from 2020-01-01 on.",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "Leave out for all three countries.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "GB",
                                "IE",
                                "AU"
                            ]
                        }
                    },
                    {
                        "name": "track",
                        "in": "query",
                        "required": false,
                        "description": "A track id from Tracks, such as romford.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, from 1. 50 races a page.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "The meta.next_cursor from your last call, for the next page.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "required": false,
                        "description": "The answer format. Adding .csv to the path does the same as csv.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "json",
                                "csv"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "data and meta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {},
                                        "meta": {
                                            "type": "object"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "An error with a code. See https://greyhoundracingapi.com/documentation/errors"
                    }
                }
            }
        },
        "/v1/racecards/today": {
            "get": {
                "operationId": "racecards_today",
                "summary": "Today's racecards",
                "description": "Today's racecards for every meeting.",
                "externalDocs": {
                    "url": "https://greyhoundracingapi.com/documentation/racecards-today"
                },
                "x-plans": [
                    "race",
                    "archive"
                ],
                "x-mcp-tool": "todays_racecards",
                "parameters": [
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "Leave out for all three countries.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "GB",
                                "IE",
                                "AU"
                            ]
                        }
                    },
                    {
                        "name": "track",
                        "in": "query",
                        "required": false,
                        "description": "A track id from Tracks, such as romford.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, from 1. 50 races a page.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "The meta.next_cursor from your last call, for the next page.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "required": false,
                        "description": "The answer format. Adding .csv to the path does the same as csv.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "json",
                                "csv"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "data and meta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {},
                                        "meta": {
                                            "type": "object"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "An error with a code. See https://greyhoundracingapi.com/documentation/errors"
                    }
                }
            }
        },
        "/v1/racecards/upcoming": {
            "get": {
                "operationId": "racecards_upcoming",
                "summary": "Upcoming races",
                "description": "The next races coming up.",
                "externalDocs": {
                    "url": "https://greyhoundracingapi.com/documentation/racecards-upcoming"
                },
                "x-plans": [
                    "race",
                    "archive"
                ],
                "x-mcp-tool": "upcoming_races",
                "parameters": [
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "Leave out for all three countries.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "GB",
                                "IE",
                                "AU"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, from 1. 50 races a page.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "The meta.next_cursor from your last call, for the next page.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "required": false,
                        "description": "The answer format. Adding .csv to the path does the same as csv.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "json",
                                "csv"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "data and meta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {},
                                        "meta": {
                                            "type": "object"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "An error with a code. See https://greyhoundracingapi.com/documentation/errors"
                    }
                }
            }
        },
        "/v1/tracks": {
            "get": {
                "operationId": "tracks",
                "summary": "Tracks",
                "description": "Every track covered, with distances.",
                "externalDocs": {
                    "url": "https://greyhoundracingapi.com/documentation/tracks"
                },
                "x-plans": [
                    "free",
                    "race",
                    "archive"
                ],
                "x-mcp-tool": "list_tracks",
                "parameters": [
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "Leave out for all three countries.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "GB",
                                "IE",
                                "AU"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "data and meta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {},
                                        "meta": {
                                            "type": "object"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "An error with a code. See https://greyhoundracingapi.com/documentation/errors"
                    }
                }
            }
        },
        "/v1/usage": {
            "get": {
                "operationId": "usage",
                "summary": "Your usage",
                "description": "Your plan, calls today and limits. Free to call.",
                "externalDocs": {
                    "url": "https://greyhoundracingapi.com/documentation/usage"
                },
                "x-plans": [
                    "free",
                    "race",
                    "archive"
                ],
                "x-mcp-tool": "my_usage",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "data and meta",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {},
                                        "meta": {
                                            "type": "object"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "An error with a code. See https://greyhoundracingapi.com/documentation/errors"
                    }
                }
            }
        }
    }
}