Bettrline · GPT アクション
DataGolf API
This API provides access to a wide range of golf data, including outrights live data, matchups data, Match-Up & 3-Ball Data Golf Odds for every pairing in the next round of current PGA Tour and European Tour events, Data Golf Rankings, Pre-Tournament Predictions, Player Skill Decompositions, Detailed Approach Skill statistics, and Fantasy Projection Defaults for various contests. You field user prompts,identify multiple api's to call, and can call multiple in one prompt response by making multiple calls and gathering all relevant information from multiple endpoints below to add context and optimal betting value to user. It covers different tours, markets, odds formats, and file formats to assist users in finding comprehensive golf analytics and projections.
GET /betting-tools/outrightsRetrieves outrights data for specified tour, market, odds format, and file format.GET /betting-tools/matchupsRetrieves matchups data for specified tour, market, odds format, and file format.GET /betting-tools/matchups-all-pairingsReturns Data Golf matchup / 3-ball odds for every pairing in the next round of current PGA Tour and European Tour events.GET /preds/get-dg-rankingsReturns the top 500 players in the current DG rankings, along with each player's skill estimate and respective OWGR rank.GET /preds/pre-tournamentReturns full-field probabilistic forecasts for the upcoming tournament on PGA, European, and Korn Ferry Tours.GET /preds/skill-ratingsReturns estimate and rank for each skill for players with sufficient Shotlink measured rounds.GET /preds/approach-skillReturns detailed player-level approach performance stats across various yardage/lie buckets.GET /preds/fantasy-projection-defaultsReturns default fantasy projections for various contests.
元の API スキーマ
{
"openapi": "3.0.0",
"info": {
"title": "DataGolf API",
"description": "This API provides access to a wide range of golf data, including outrights live data, matchups data, Match-Up & 3-Ball Data Golf Odds for every pairing in the next round of current PGA Tour and European Tour events, Data Golf Rankings, Pre-Tournament Predictions, Player Skill Decompositions, Detailed Approach Skill statistics, and Fantasy Projection Defaults for various contests. You field user prompts,identify multiple api's to call, and can call multiple in one prompt response by making multiple calls and gathering all relevant information from multiple endpoints below to add context and optimal betting value to user. It covers different tours, markets, odds formats, and file formats to assist users in finding comprehensive golf analytics and projections.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://feeds.datagolf.com"
}
],
"paths": {
"/betting-tools/outrights": {
"get": {
"operationId": "getOutrightsData",
"summary": "Retrieves outrights data for specified tour, market, odds format, and file format.",
"parameters": [
{
"in": "query",
"name": "tour",
"description": "Specifies the tour. Defaults to PGA.",
"schema": {
"type": "string",
"default": "pga",
"enum": [
"pga",
"euro",
"kft",
"opp",
"alt"
]
}
},
{
"in": "query",
"name": "market",
"description": "Specifies the match-up market.",
"required": true,
"schema": {
"type": "string",
"enum": [
"win",
"top_5",
"top_10",
"top_20",
"mc",
"make_cut",
"frl"
]
}
},
{
"in": "query",
"name": "odds_format",
"description": "Specifies the odds format. Defaults to decimal.",
"schema": {
"type": "string",
"default": "decimal",
"enum": [
"percent",
"american",
"decimal",
"fraction"
]
}
},
{
"in": "query",
"name": "file_format",
"description": "Specifies the file format. Defaults to JSON.",
"schema": {
"type": "string",
"default": "json",
"enum": [
"json",
"csv"
]
}
},
{
"in": "query",
"name": "key",
"description": "API token for authorization. '&key=e48d92abe358dce98981bafc7fdd`.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response with outrights data.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
},
"400": {
"description": "Bad request, possible issue with provided parameters."
},
"401": {
"description": "Unauthorized request, API token missing or invalid."
}
}
}
},
"/betting-tools/matchups": {
"get": {
"operationId": "getMatchupsData",
"summary": "Retrieves matchups data for specified tour, market, odds format, and file format.",
"parameters": [
{
"in": "query",
"name": "tour",
"description": "Specifies the tour. Defaults to PGA.",
"schema": {
"type": "string",
"default": "pga",
"enum": [
"pga",
"euro",
"opp",
"alt"
]
}
},
{
"in": "query",
"name": "market",
"description": "Specifies the match-up market.",
"required": true,
"schema": {
"type": "string",
"enum": [
"tournament_matchups",
"round_matchups",
"3_balls"
]
}
},
{
"in": "query",
"name": "odds_format",
"description": "Specifies the odds format. Defaults to decimal.",
"schema": {
"type": "string",
"default": "decimal",
"enum": [
"percent",
"american",
"decimal",
"fraction"
]
}
},
{
"in": "query",
"name": "file_format",
"description": "Specifies the file format. Defaults to JSON.",
"schema": {
"type": "string",
"default": "json",
"enum": [
"json",
"csv"
]
}
},
{
"in": "query",
"name": "key",
"description": "API token for authorization. '&key=e48d92abe358dce98981bafc7fdd`.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response with matchups data.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
},
"400": {
"description": "Bad request, possible issue with provided parameters."
},
"401": {
"description": "Unauthorized request, API token missing or invalid."
}
}
}
},
"/betting-tools/matchups-all-pairings": {
"get": {
"operationId": "getMatchupsAllPairingsData",
"summary": "Returns Data Golf matchup / 3-ball odds for every pairing in the next round of current PGA Tour and European Tour events.",
"parameters": [
{
"in": "query",
"name": "tour",
"description": "Specifies the tour. Defaults to PGA.",
"schema": {
"type": "string",
"default": "pga",
"enum": [
"pga",
"euro",
"opp",
"alt"
]
}
},
{
"in": "query",
"name": "odds_format",
"description": "Specifies the odds format. Defaults to decimal.",
"schema": {
"type": "string",
"default": "decimal",
"enum": [
"percent",
"american",
"decimal",
"fraction"
]
}
},
{
"in": "query",
"name": "file_format",
"description": "Specifies the file format. Defaults to JSON.",
"schema": {
"type": "string",
"default": "json",
"enum": [
"json",
"csv"
]
}
},
{
"in": "query",
"name": "key",
"description": "API token for authorization. '&key=e48d92abe358dce98981bafc7fdd`.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response with matchup / 3-ball odds data.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
},
"400": {
"description": "Bad request, possible issue with provided parameters."
},
"401": {
"description": "Unauthorized request, API token missing or invalid."
}
}
}
},
"/preds/get-dg-rankings": {
"get": {
"operationId": "getDataGolfRankings",
"summary": "Returns the top 500 players in the current DG rankings, along with each player's skill estimate and respective OWGR rank.",
"parameters": [
{
"in": "query",
"name": "file_format",
"description": "Specifies the file format. Defaults to JSON.",
"schema": {
"type": "string",
"default": "json",
"enum": [
"json",
"csv"
]
}
},
{
"in": "query",
"name": "key",
"description": "API token for authorization. '&key=e48d92abe358dce98981bafc7fdd`.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response with Data Golf Rankings.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
},
"400": {
"description": "Bad request, possible issue with provided parameters."
},
"401": {
"description": "Unauthorized request, API token missing or invalid."
}
}
}
},
"/preds/pre-tournament": {
"get": {
"operationId": "getPreTournamentPredictions",
"summary": "Returns full-field probabilistic forecasts for the upcoming tournament on PGA, European, and Korn Ferry Tours.",
"parameters": [
{
"in": "query",
"name": "tour",
"description": "Specifies the tour. Defaults to PGA.",
"schema": {
"type": "string",
"default": "pga",
"enum": [
"pga",
"euro",
"kft",
"opp",
"alt"
]
}
},
{
"in": "query",
"name": "add_position",
"description": "Comma-separated list of additional positions to include in output. Defaults are win, top 5, top 10, top 20, make cut.",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "odds_format",
"description": "Specifies the odds format. Defaults to percent.",
"schema": {
"type": "string",
"default": "percent",
"enum": [
"percent",
"american",
"decimal",
"fraction"
]
}
},
{
"in": "query",
"name": "file_format",
"description": "Specifies the file format. Defaults to JSON.",
"schema": {
"type": "string",
"default": "json",
"enum": [
"json",
"csv"
]
}
},
{
"in": "query",
"name": "key",
"description": "API token for authorization. '&key=e48d92abe358dce98981bafc7fdd`.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response with Pre-Tournament Predictions.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
},
"400": {
"description": "Bad request, possible issue with provided parameters."
},
"401": {
"description": "Unauthorized request, API token missing or invalid."
}
}
}
},
"/preds/skill-ratings": {
"get": {
"operationId": "getPlayerSkillRatings",
"summary": "Returns estimate and rank for each skill for players with sufficient Shotlink measured rounds.",
"parameters": [
{
"in": "query",
"name": "display",
"description": "Specifies how stats are displayed, by value or rank.",
"schema": {
"type": "string",
"default": "value",
"enum": [
"value",
"rank"
]
}
},
{
"in": "query",
"name": "file_format",
"description": "Specifies the file format. Defaults to JSON.",
"schema": {
"type": "string",
"default": "json",
"enum": [
"json",
"csv"
]
}
},
{
"in": "query",
"name": "key",
"description": "API token for authorization. '&key=e48d92abe358dce98981bafc7fdd`.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response with player skill ratings.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
},
"400": {
"description": "Bad request, possible issue with provided parameters."
},
"401": {
"description": "Unauthorized request, API token missing or invalid."
}
}
}
},
"/preds/approach-skill": {
"get": {
"operationId": "getDetailedApproachSkill",
"summary": "Returns detailed player-level approach performance stats across various yardage/lie buckets.",
"parameters": [
{
"in": "query",
"name": "period",
"description": "Specifies time period. Defaults to last 24 months.",
"schema": {
"type": "string",
"default": "l24",
"enum": [
"l24",
"l12",
"ytd"
]
}
},
{
"in": "query",
"name": "file_format",
"description": "Specifies the file format. Defaults to JSON.",
"schema": {
"type": "string",
"default": "json",
"enum": [
"json",
"csv"
]
}
},
{
"in": "query",
"name": "key",
"description": "API token for authorization. '&key=e48d92abe358dce98981bafc7fdd`.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response with detailed approach skill stats.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
},
"400": {
"description": "Bad request, possible issue with provided parameters."
},
"401": {
"description": "Unauthorized request, API token missing or invalid."
}
}
}
},
"/preds/fantasy-projection-defaults": {
"get": {
"operationId": "getFantasyProjectionDefaults",
"summary": "Returns default fantasy projections for various contests.",
"parameters": [
{
"in": "query",
"name": "tour",
"description": "Specifies the tour. Defaults to PGA.",
"schema": {
"type": "string",
"default": "pga",
"enum": [
"pga",
"euro",
"opp",
"alt"
]
}
},
{
"in": "query",
"name": "site",
"description": "Specifies the site. Defaults to draftkings.",
"schema": {
"type": "string",
"default": "draftkings",
"enum": [
"draftkings",
"fanduel",
"yahoo"
]
}
},
{
"in": "query",
"name": "slate",
"description": "Specifies the slate. Defaults to main.",
"schema": {
"type": "string",
"default": "main",
"enum": [
"main",
"showdown",
"showdown_late",
"weekend",
"captain"
]
}
},
{
"in": "query",
"name": "file_format",
"description": "Specifies the file format. Defaults to JSON.",
"schema": {
"type": "string",
"default": "json",
"enum": [
"json",
"csv"
]
}
},
{
"in": "query",
"name": "key",
"description": "API token for authorization. '&key=e48d92abe358dce98981bafc7fdd`.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response with fantasy projection defaults.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
},
"400": {
"description": "Bad request, possible issue with provided parameters."
},
"401": {
"description": "Unauthorized request, API token missing or invalid."
}
}
}
}
}
}Odds API
Fetches live and upcoming sports odds from the Odds API for analysis.
GET /v4/sports/{sport}/oddsGet live and upcoming sports oddsFetches live and upcoming sports odds from the API for analysis.
元の API スキーマ
{
"openapi": "3.0.0",
"info": {
"title": "Odds API",
"description": "Fetches live and upcoming sports odds from the Odds API for analysis.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api.the-odds-api.com",
"description": "The Odds API Server"
}
],
"paths": {
"/v4/sports/{sport}/odds": {
"get": {
"summary": "Get live and upcoming sports odds",
"description": "Fetches live and upcoming sports odds from the API for analysis.",
"operationId": "getOdds",
"parameters": [
{
"name": "apiKey",
"in": "query",
"required": true,
"description": "API key for authenticating with the odds API",
"schema": {
"type": "string",
"default": "07f1e1c32fabbad0469f5a4d67b2ea9b"
}
},
{
"name": "sport",
"in": "path",
"required": true,
"description": "Sport key to fetch odds for",
"schema": {
"type": "string",
"example": "americanfootball_nfl"
}
},
{
"name": "regions",
"in": "query",
"required": true,
"description": "Comma separated list of bookmaker regions to fetch odds from",
"schema": {
"type": "string",
"example": "us,uk,eu"
}
},
{
"name": "markets",
"in": "query",
"required": true,
"description": "Comma separated list of betting markets to fetch odds for",
"schema": {
"type": "string",
"example": "h2h,spreads,totals"
}
},
{
"name": "oddsFormat",
"in": "query",
"description": "Format of the odds to be returned",
"schema": {
"type": "string",
"enum": [
"american",
"decimal"
],
"default": "american"
}
},
{
"name": "dateFormat",
"in": "query",
"description": "Format of the date in the response",
"schema": {
"type": "string",
"enum": [
"unix",
"iso"
],
"default": "iso"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"metaData": {
"type": "object",
"properties": {
"requests_used": {
"type": "string"
},
"requests_remaining": {
"type": "string"
}
}
},
"eventData": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
},
"400": {
"description": "Bad request"
}
}
}
}
},
"components": {
"schemas": {
"EventData": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"commence_time": {
"type": "string"
},
"bookmaker": {
"type": "string"
},
"last_update": {
"type": "string"
},
"home_team": {
"type": "string"
},
"away_team": {
"type": "string"
},
"market": {
"type": "string"
},
"label_1": {
"type": "string"
},
"odd_1": {
"type": "string"
},
"point_1": {
"type": "string"
},
"label_2": {
"type": "string"
},
"odd_2": {
"type": "string"
},
"point_2": {
"type": "string"
},
"odd_draw": {
"type": "string"
}
}
}
}
},
"functions": {
"handleGetOdds": {
"description": "Handles fetching odds data from the API and processes it for analysis",
"handler": "handle_get_odds",
"inputs": {
"apiKey": {
"type": "string"
},
"sport": {
"type": "string"
},
"regions": {
"type": "string"
},
"markets": {
"type": "string"
},
"oddsFormat": {
"type": "string"
},
"dateFormat": {
"type": "string"
}
}
}
},
"handlers": {
"handle_get_odds": {
"code": "import requests\n\ndef handle_get_odds(apiKey, sport, regions, markets, oddsFormat='american', dateFormat='iso'):\n url = f\"https://api.the-odds-api.com/v4/sports/{sport}/odds\"\n params = {\n 'apiKey': apiKey,\n 'regions': regions,\n 'markets': markets,\n 'oddsFormat': oddsFormat,\n 'dateFormat': dateFormat\n }\n \n response = requests.get(url, params=params)\n data = response.json()\n \n if response.status_code != 200:\n return {\"error\": data.get(\"message\", \"Failed to fetch data from the odds API\")}\n \n # Extract relevant data for analysis\n metaData = {\n 'requests_used': response.headers.get('x-requests-used'),\n 'requests_remaining': response.headers.get('x-requests-remaining')\n }\n eventData = format_events(data)\n \n return {\n 'metaData': metaData,\n 'eventData': eventData\n }\n\ndef format_events(events):\n rows = [\n [\n 'id',\n 'commence_time',\n 'bookmaker',\n 'last_update',\n 'home_team',\n 'away_team',\n 'market',\n 'label_1',\n 'odd_1',\n 'point_1',\n 'label_2',\n 'odd_2',\n 'point_2',\n 'odd_draw',\n ]\n ]\n\n for event in events:\n for bookmaker in event.get('bookmakers', []):\n for market in bookmaker.get('markets', []):\n outcomes = market.get('outcomes', [])\n if len(outcomes) == 2:\n outcome_1, outcome_2 = outcomes\n outcome_draw = {}\n else:\n outcome_1 = next((o for o in outcomes if o['name'] == event['home_team']), {})\n outcome_2 = next((o for o in outcomes if o['name'] == event['away_team']), {})\n outcome_draw = next((o for o in outcomes if o['name'] == 'Draw'), {})\n \n rows.append([\n event['id'],\n event['commence_time'],\n bookmaker['key'],\n bookmaker['last_update'],\n event['home_team'],\n event['away_team'],\n market['key'],\n outcome_1.get('name'),\n outcome_1.get('price'),\n outcome_1.get('point', None),\n outcome_2.get('name'),\n outcome_2.get('price'),\n outcome_2.get('point', None),\n outcome_draw.get('price', None),\n ])\n return rows\n"
}
}
}