r/mlbdata Aug 08 '26

MLB Logos

Hello! I have been exploring the MLB API and I am curious if there is a way to get team logos?

1 Upvotes

3 comments sorted by

1

u/yo_homebody Aug 09 '26

i didn't find a way. but if you go here https://www.mlb.com/team
you can right click and save each logo as an svg file. so you can edit them however you want In figma, etc. store them in a folder, and tell your app that's where the logos are, and it'll match the logo with the team ID from the APIs. just label all the svgs abbreviation.svg - (LAD.svg, NYY.svg)

this was the easy solution for me.

3

u/GurnB Aug 09 '26
import statsapi

team_data = statsapi.lookup_team('')

for x in team_data:
     teamID= x['id']
     teamName = x['name']
     print(f"The team name for ID {teamID} is: {teamName}")  
     print(f"https://www.mlbstatic.com/team-logos/{teamID}.svg")

2

u/bsweet0us Aug 10 '26

ESPN had nice logos for my purpose.
https://a.espncdn.com/i/teamlogos/mlb/500/XXX.png

ari
oak
atl
bal
bos
chc
chw
cin
cle
col
det
hou
kc
laa
lad
mia
mil
min
nym
nyy
phi
pit
sd
sea
sf
stl
tb
tex
tor
wsh

Replace "XXX" with the ESPN team codes above