I use the code below to fetch the JSON data for some of the stocks (e.g. https://www.tipranks.com/stocks/tsla/forecast ):
import json
import requests
url = " https://tr-frontend-cdn.azureedge.net/bff/prod/stock/tsla/payload.json?ver=1678406987078"
req = requests.get(url)
data = req.json()
But the website also has the data for ETF’s (for example,
https://www.tipranks.com/etf/xlb/forecast )
But I don’y know that url to use in this case (I tried https://tr-frontend-cdn.azureedge.net/bff/prod/etf/xlp/payload.json?ver=1678406987078 but this does not work).
Can someone help me identify what url should I put to properly get the JSON data?
2
Answers
What I do in such case is:
In your case, you did not precise what data you were looking for, but I suspect this could be the endpoint you were looking for: https://www.tipranks.com/etf/xlb/payload.json
Try to set
User-Agent
header:Prints: