from fastapi import FastAPI import requests url='https://trends.google.com/_/TrendsUi/data/batchexecute' data={ 'f.req':'[[["i0OFE","[null,null,\"DZ\",0,\"en-US\",4,1]",null,"generic"]]]' } headers={ 'Origin':'https://trends.google.com', 'host':'trends.google.com', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0' } req=requests.post(url,data=data) print(req) '''app = FastAPI() @app.get("/") def greet_json(): return {"Hello": "World!"}'''