DraftKings does not have a public API with documentation.
However, one can identify network API calls to fetch data from DraftKings - data like NFL contests, or players available for a "Draft Group" (e.g. all NBA games starting at 7 PM EST tonight), along with relevant metadata.
As DraftKings makes no guarantees about it's public API, this client makes no guarantees that existing API methods will work consistently.
pip install draft_kings
from draft_kings.data import Sport
from draft_kings.client import contests
contests(sport=Sport.NBA)
from draft_kings.client import available_players
available_players(draft_group_id=1)
from draft_kings.client import draft_group_details
draft_group_details(draft_group_id=1)
Get all country information that DraftKings uses to make country-specific requests
from draft_kings.client import countries
countries()
Get all region information for the specified country code that DraftKings uses to make region-specific requests
from draft_kings.client import regions
regions(country_code='US')
Get all draftable players
from draft_kings.client import draftables
draftables(draft_group_id=1)