Team ID
You can find teams using regex patterns on fields such as full name, state, city, and nickname. As well as finding teams by year founded, abbreviation, and id.
from nba_api.stats.static import teams
# Find teams by full name.
teams.find_teams_by_full_name('cav')
# Find teams by state.
teams.find_teams_by_state('ohio')
# Find teams by city.
teams.find_teams_by_city('cleveland')
# Find teams by team nickname.
teams.find_teams_by_nickname('cav')
# Find teams by year founded.
teams.find_teams_by_year_founded(1968)
# Find teams by abbreviation.
teams.find_team_by_abbreviation('cle')
# Find teams by id.
teams.find_team_name_by_id(1610612739)
# Get all teams.
teams.get_teams()
For examples of how to use this functionality, check out the Examples section