Obviously I can try to scrape websites for this info but that is brittle.
Query an ETF-only site. For example,
https://etfdb.com/etf/TSLA/#etf-ticker-profile has
But https://etfdb.com/etf/GUNR/#etf-ticker-profile has
This doesn't look too hard to determine ETF or not.