Swish Analytics NBA API
The NBA API from Swish Analytics — 10 operation(s) for nba.
The NBA API from Swish Analytics — 10 operation(s) for nba.
openapi: 3.1.0
info:
title: Swish Analytics Sportsbook ATP Tennis NBA API
version: v1
description: 'Machine-learning sportsbook data API from Swish Analytics: player prop pricing, pre-match and in-play match/team markets, bet-request (single and parlay) pricing, and results across NFL, NBA, MLB, NHL, NCAA basketball & football, ATP, WTA and soccer. Derived by the API Evangelist enrichment pipeline from the provider''s live documentation service (docs-api.swishanalytics.com/v1). Content is faithful to published docs; not an authoritative provider-published OpenAPI.'
termsOfService: https://swishanalytics.com
contact:
name: Swish Analytics
url: https://docs.swishanalytics.com
x-apievangelist:
generated: '2026-07-21'
method: derived
source: 'https://docs-api.swishanalytics.com/v1 (live documentation service: /markets, /documentation/params, /documentation/response-fields)'
note: Faithfully derived from Swish Analytics live developer documentation; endpoint list, query parameters and response fields are provider-published. Not an authoritative provider-published OpenAPI.
servers:
- url: https://api.swishanalytics.com
description: Production
security:
- ApiKey: []
tags:
- name: NBA
paths:
/nba/bet-request:
get:
operationId: getNbaBetRequest
summary: Nba Bet-request
tags:
- NBA
security:
- ApiKey: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
endpoint:
type: string
description: Provides the specific endpoint used to make your request to assist in validating responses
gameId:
type: number
description: Provides the appropriate ID of the event to which each market belongs as found in the >/nba/games endpoint
id:
type: number
description: Provides the appropriate ID of the stat type to which each market corresponds as found in the /nba/players/stats/types endpoint
line:
type: number
description: Provides the line offered for the specified markets returned by your request
margin:
type: number
description: Provides the value expressed as a percentage in decimal form identifying the margin applied to the market provided in the response
marketAdj:
type: boolean
description: Provides the value identifying the market provided in the response as either using market adjusted lines (true) or not using market adjusted lines (false)
marketSuspended:
type: boolean
description: Provides the value identifying a market as either suspended (true) or not suspended (false)
over:
type: number
nullable: true
description: Provides the Over outcome price for the line attached to the specified market expressed as a percentage in decimal form
parlay:
type: boolean
description: Provides the value identifying the market provided in the response as either an accumulator (true) or not an accumulator (false)
parlayProb:
type: number
nullable: true
description: Provides the cumulative price expressed as a percentage in decimal form to be offered for the single market or accumulator provided in the response
parlaySuspended:
type: boolean
nullable: true
description: Provides the value identifying the accumulator provided in the response as either suspended (true) or not suspended (false)
playerId:
type: number
description: Provides the appropriate ID of the player to whom each market belongs as found in the /nba/players endpoint
playerName:
type: string
description: Provides the name of the player to whom each market belongs as found in the /nba/players endpoint
prob:
type: number
nullable: true
description: Provides the price expressed as a percentage in decimal form for the associated market & line type as specified in your initial request
push:
type: number
nullable: true
description: Provides the Push outcome price for the line attached to the specified market expressed as a percentage in decimal form
sport:
type: string
description: The 3-letter abbreviation of the sport associated with the specified markets returned by your request
status:
type: boolean
description: Provides the value identifying the request made as either successful (true) or not successful (false)
type:
type: string
nullable: true
description: Provides the line type for the associated market as specified in your initial request
under:
type: number
nullable: true
description: Provides the Under outcome price for the line attached to the specified market expressed as a percentage in decimal form
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
parameters:
- name: parlay
in: query
required: true
description: Specifies if this is a bet request for an accumulator (true) or a single market (false)
schema:
type: boolean
example: 'true'
- name: margin
in: query
required: true
description: Specifies the margin you would like applied to the returned market. Margin must be a value from 0 to 1 & accepts up to 3 decimal places
schema:
type: string
example: '0.05'
- name: marketAdj
in: query
required: true
description: Specifies if this is a request for markets using our market adjusted (true) or non-market adjusted (false) lines
schema:
type: boolean
example: 'true'
- name: sport
in: query
required: true
description: Provides the appropriate 3-letter abbreviation of the sport for which you are requesting data
schema:
type: string
example: nba
- name: playerId
in: query
required: true
description: The ID value(s) of the player(s) for which you are requesting data.
schema:
type: number
example: '458730'
- name: teamId
in: query
required: true
description: Specifies the unique teamId associated with each leg you are requesting per props object. When requesting match-level markets that are not specifically tied to one team, teamId is still required, but either teamId from the match is allowed
schema:
type: number
example: '9'
- name: gameId
in: query
required: true
description: The ID value(s) of the event(s) for which you are requesting schedule data.
schema:
type: number
example: '2270924'
- name: statTypeId
in: query
required: true
description: The ID value of the stat-type for which you are requesting a market. This property accepts a single value per object
schema:
type: number
example: '100'
- name: line
in: query
required: true
description: The specific line value for which you are requesting pricing. This property accepts a single value per object
schema:
type: number
example: '26'
- name: lineType
in: query
required: true
description: Can be used to request only fractional lines or integer lines.
schema:
type: string
example: over
/nba/bet-request/results:
get:
operationId: getNbaBetRequestResults
summary: Nba Bet-request Results
tags:
- NBA
security:
- ApiKey: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
gameId:
type: number
description: Provides the associated ID value for the game(s) as specified in your request
grade:
type: string
nullable: true
description: Provides the result for each individual market returned by your request, as well as the overall grade of the parlay when your request contains parlay=true
line:
type: number
description: Provides the associated line-value for the market(s) as specified in your request
lineType:
type: string
description: Provides the associated bet-type of over, under or push for the market(s) as specified in your request
margin:
type: number
description: Provides the margin-value applied to the market(s) as specified in your request
marketAdj:
type: boolean
description: Provides the value identifying the requested results as either using market-adjusted lines (true) or not using market-adjusted lines (false)
marketSuspended:
type: boolean
description: Provides the value identifying the individual market(s) provided in the response as either suspended (true) or not suspended (false)
parlay:
type: boolean
description: Provides the value identifying the requested results as either for a parlay (true) or not for a parlay (false)
parlaySuspended:
type: boolean
nullable: true
description: Provides the value identifying the requested parlay returned as either suspended (true) or not suspended (false)
playerId:
type: number
nullable: true
description: Provides the associated ID value for the player(s) as specified in your request
sport:
type: string
description: Provides the 3-letter abbreviation of the sport for which you are requesting results
statTypeId:
type: number
description: Provides the associated ID value for the stat(s) as specified in your request
status:
type: boolean
description: Provides the value identifying the result(s) returned as either valid (true) or not valid (false)
teamId:
type: number
nullable: true
description: Provides the associated ID value for the team(s) as specified in your request
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
parameters:
- name: parlay
in: query
required: true
description: Specifies if this is a bet request for an accumulator (true) or a single market (false)
schema:
type: boolean
example: 'true'
- name: margin
in: query
required: true
description: Specifies the margin you would like applied to the returned market. Margin must be a value from 0 to 1 & accepts up to 3 decimal places
schema:
type: string
example: '0.05'
- name: marketAdj
in: query
required: true
description: Specifies if this is a request for markets using our market adjusted (true) or non-market adjusted (false) lines
schema:
type: boolean
example: 'true'
- name: sport
in: query
required: true
description: Provides the appropriate 3-letter abbreviation of the sport for which you are requesting data
schema:
type: string
example: nba
- name: playerId
in: query
required: true
description: The ID value(s) of the player(s) for which you are requesting data.
schema:
type: number
example: '458730'
- name: teamId
in: query
required: true
description: Specifies the unique teamId associated with each leg you are requesting per props object. When requesting match-level markets that are not specifically tied to one team, teamId is still required, but either teamId from the match is allowed
schema:
type: number
example: '9'
- name: gameId
in: query
required: true
description: The ID value(s) of the event(s) for which you are requesting schedule data.
schema:
type: number
example: '2270924'
- name: statTypeId
in: query
required: true
description: The ID value of the stat-type for which you are requesting a market. This property accepts a single value per object
schema:
type: number
example: '100'
- name: line
in: query
required: true
description: The specific line value for which you are requesting pricing. This property accepts a single value per object
schema:
type: number
example: '26'
- name: lineType
in: query
required: true
description: Can be used to request only fractional lines or integer lines.
schema:
type: string
example: over
/nba/matches/markets/inplay:
get:
operationId: getNbaMatchesMarketsInplay
summary: Nba Matches Markets Inplay
tags:
- NBA
security:
- ApiKey: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
abbr:
type: string
description: Provides the 3-letter abbreviation for the specified home or away team
abbreviation:
type: string
description: Provides the appropriate abbreviation for the specified market duration
accrued:
type: number
description: Provides the current total value of the specified stat-type generated by the team or match up to the present moment in the game ( not to be used for resulting purposes)
awaySummaryId:
type: string
description: Provides a unique market identifier for the specified sport, team, match, week and away team
balanced:
type: boolean
description: Provides the value identifying a line for the specified market as either balanced (1) or unballanced (0)
count:
type: number
description: Provides the total count of markets returned by your request
date:
type: string
description: Provides the UTC date(s) of the event(s) for the specified markets returned by your request
description:
type: string
description: Provides a text-snippet denoting the state of the market, status, etc
end:
type: number
description: Provides the numerical value denoting when results stop accruing for this market where 99 equals the end of the game
endpoint:
type: string
description: Provides the specific endpoint used to make your request to assist in validating requests
homeSummaryId:
type: string
description: Provides a unique market identifier for the specified sport, team, match, week and home team
id:
type: number
description: Provides the appropriate ID for the specified team, market type, etc
line:
type: number
nullable: true
description: Provides the line offered for the specified markets returned by your request
marketSuspended:
type: boolean
description: Provides the value identifying a market as either suspended (true) or not suspended (false)
matchId:
type: number
description: Provides the ID value of the match associated with the markets returned by your request
mean:
type: number
nullable: true
description: Provides the raw mean projection value for the specified markets returned by your request
median:
type: number
nullable: true
description: Provides the raw median projection value for the specified markets returned by your request
micro:
type: string
description: Provides the UTC timestamp in a micro-seconds format denoting when the associated market was last updated with new data
optimal:
type: boolean
description: Provides the value identifying a line for the specified market as either optimal (1) or not optimal (0)
over:
type: number
nullable: true
description: Provides the Over outcome price for the line attached to the specified market expressed as a percentage in decimal form
push:
type: number
nullable: true
description: Provides the Push outcome price for the line attached to the specified market expressed as a percentage in decimal form
resultingId:
type: string
description: Provides a unique market identifier for the specified sport, team, match, week and team to be when resulting markets via the associated results endpoint
season:
type: number
description: The 4-digit year of the season associated with the specified markets returned by your request. For seasons that span multiple calendar years (eg 2019-2020), the first calendar year is returned
seconds:
type: string
description: Provides the UTC timestamp in a seconds format denoting when the associated market was last updated with new data
sport:
type: string
description: The 3-letter abbreviation or ID value of the sport associated with the specified markets returned by your request
start:
type: number
description: Provides the numerical value denoting when results begin to accrue for this market where 1 equals the start of the game
type:
type: string
description: Provides the description denoting whether the associated market data is for a fractional line or a integer line
typeId:
type: string
description: Provides the numerical value denoting whether the associated market data is for a fractional line (1) or an integer line (0)
under:
type: number
nullable: true
description: Provides the Under outcome price for the line attached to the specified market expressed as a percentage in decimal form
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
parameters:
- name: game
in: query
required: true
description: The ID value of the event for which you are requesting market data.
schema:
type: number
example: '2591473'
- name: stat
in: query
required: false
description: The ID value(s) of the statistic(s) for which you are requesting data.
schema:
type: number
example: '150'
- name: modifiedAtMicroGreater
in: query
required: false
description: The UTC timestamp(s) denoting when a market was last updated with new data in micro seconds to be used to request all markets that have been updated at or after the timestamp passed in. Value passed in should always be the max modifiedAtMicro from the most recent payload received
schema:
type: string
example: '2024-03-08 05:27:20.301902'
/nba/matches/markets/prematch:
get:
operationId: getNbaMatchesMarketsPrematch
summary: Nba Matches Markets Prematch
tags:
- NBA
security:
- ApiKey: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
abbr:
type: string
description: Provides the 3-letter abbreviation for the specified home or away team
abbreviation:
type: string
description: Provides the appropriate abbreviation for the specified market duration
awaySummaryId:
type: string
description: Provides a unique market identifier for the specified sport, team, match, week and away team
balanced:
type: number
description: Provides the value identifying a line for the specified market as either balanced (1) or unballanced (0)
count:
type: number
description: Provides the total count of markets returned by your request
date:
type: string
description: Provides the EST date(s) of the event(s) for the specified markets returned by your request
description:
type: string
description: Provides a text-snippet denoting the state of the market, status, etc
endpoint:
type: string
description: Provides the specific endpoint used to make your request to assist in validating requests
homeSummaryId:
type: string
description: Provides a unique market identifier for the specified sport, team, match, week and home team
id:
type: number
description: Provides the appropriate ID for the specified team, stat-type, market, etc
line:
type: number
nullable: true
description: Provides the line offered for the specified markets returned by your request
marketSuspended:
type: boolean
description: Provides the value identifying a market as either suspended (true) or not suspended (false)
matchId:
type: number
description: Provides the ID value of the match associated with the markets returned by your request
mean:
type: number
nullable: true
description: Provides the raw mean projection value for the specified markets returned by your request
median:
type: number
nullable: true
description: Provides the raw median projection value for the specified markets returned by your request
micro:
type: string
description: Provides the UTC timestamp in a micro-seconds format denoting when the associated market was last updated with new data
optimal:
type: number
description: Provides the value identifying a line for the specified market as either optimal (1) or not optimal (0)
over:
type: number
nullable: true
description: Provides the Over outcome price for the line attached to the specified market expressed as a percentage in decimal form
push:
type: number
nullable: true
description: Provides the Push outcome price for the line attached to the specified market expressed as a percentage in decimal form
resultingId:
type: string
description: Provides a unique market identifier for the specified sport, team, match, week and team to be when resulting markets via the associated results endpoint
season:
type: number
description: The 4-digit year of the season associated with the specified markets returned by your request. For seasons that span multiple calendar years (eg 2019-2020), the first calendar year is returned
seconds:
type: string
description: Provides the UTC timestamp in a seconds format denoting when the associated market was last updated with new data
sport:
type: string
description: The 3-letter abbreviation or ID value of the sport associated with the specified markets returned by your request
type:
type: string
description: Provides the description denoting whether the associated market data is for a fractional line or a integer line
typeId:
type: number
description: Provides the value identifying a line for the specified market as either a fractional line (1) or an integer line (0)
under:
type: number
nullable: true
description: Provides the Under outcome price for the line attached to the specified market expressed as a percentage in decimal form
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
parameters:
- name: date
in: query
required: false
description: The EST date(s) of the event(s) for which you are requesting market data in YYYY-MM-DD format.
schema:
type: string
example: '2020-01-15'
- name: game
in: query
required: false
description: The ID value(s) of the event(s) for which you are requesting market data.
schema:
type: number
example: '2176872'
- name: modifiedAtGreater
in: query
required: false
description: The UTC timestamp(s) denoting when a market was last updated with new data in micro seconds to be used to request all markets that have been updated at or after the timestamp passed in. Value passed in should always be the max modifiedAt from the most recent payload received
schema:
type: string
example: '2018-09-09 19:42:29'
- name: modifiedAtMicroGreater
in: query
required: false
description: The UTC timestamp(s) denoting when a market was last updated with new data in micro seconds to be used to request all markets that have been updated at or after the timestamp passed in. Value passed in should always be the max modifiedAtMicro from the most recent payload received
schema:
type: string
example: '2018-09-09 19:42:29.317683'
- name: team
in: query
required: false
description: The ID value(s) of the team(s) for which you are requesting markets.
schema:
type: number
example: '23'
- name: opponent
in: query
required: false
description: The ID value(s) of the opposing team(s) for which you are requesting data.
schema:
type: number
example: '9'
- name: season
in: query
required: false
description: The 4 digit value(s) for current or requested sport season(s). For sports whose seasons span multiple calendar years, the starting year must be used to fetch data for said season (eg for the 2024-2025 season, use 2024 )
schema:
type: number
example: '2019'
- name: optimal
in: query
required: false
description: Can be used to request markets classified as optimal (true) or not optimal (false)
schema:
type: boolean
example: 'true'
- name: balanced
in: query
required: false
description: Can be used to request markets classified as balanced (true) or not balanced (false)
schema:
type: boolean
example: 'true'
- name: stat
in: query
required: false
description: The ID value(s) of the statistic(s) for which you are requesting data.
schema:
type: number
example: '100'
- name: gameTypeId
in: query
required: false
description: The ID value(s) denoting the type of game(s) for which you are requesting markets.
schema:
type: number
example: '1'
- name: match
in: query
required: false
description: The ID value(s) of the event(s) for which you are requesting schedule data.
schema:
type: number
example: '565378'
- name: gameId
in: query
required: false
description: The ID value(s) of the event(s) for which you are requesting schedule data.
schema:
type: number
example: '2176872'
- name: lineType
in: query
required: false
description: Can be used to request only fraction lines or integer lines. Accepts only fraction or integer as values
schema:
type: string
example: fraction
/nba/matches/markets/prematch/alternates:
get:
operationId: getNbaMatchesMarketsPrematchAlternates
summary: Nba Matches Markets Prematch Alternates
tags:
- NBA
security:
- ApiKey: []
responses:
'200':
description: Successful response
content:
application/json:
# --- truncated at 32 KB (87 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/swish-analytics/refs/heads/main/openapi/swish-analytics-nba-api-openapi.yml