import requests
import json

url = "https://tiktok-download-video1.p.rapidapi.com/feedSearch"

querystring = {"keywords":"Ubuntu desktop","count":"10","cursor":"0","region":"US","publish_time":"0","sort_type":"1"}

headers = {
	"X-RapidAPI-Key": "YOUR_API_KEY",
	"X-RapidAPI-Host": "tiktok-download-video1.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
with open("./record_1.json", "w") as f:
    json.dump(response.json(), f)
