balldontlie
balldontlie copied to clipboard
easy way to find player IDs
is there an easier way to find a specific player ID -- maybe even by team -- than having to paginate through each "all players" query and paginating by 100?
is it possible to find all player stats from a specific team of the current season?
@edwardz8 I found it easiest to just scrape the roster for a team from ESPN (or wherever) then run a function that searches the BDL api for each player, and saves their data to firebase - all server side. Firebase might even be overkill for something like this too. If you're using something like Next/Nuxt, a JSON file would probably be good enough.
https://github.com/treyg/pistons-tracker/blob/master/server/scrape.js https://github.com/treyg/pistons-tracker/blob/master/server/index.js
ah cool. i'll look into it. thanks
(as of 2023) There's a "search" parameter for the players api. You can search by first or last name.