[英]How do I solve an error related with APIs
我想獲得有關 API 的信息,但我收到此錯誤:**{“消息”:“您沒有訂閱此 API。”}**我該如何解決這個問題?我的代碼是這個:
url = "https://imdb8.p.rapidapi.com/title/get-top-stripe"
querystring = {"currentCountry":"US","purchaseCountry":"US","tconst":""}
headers = {
'x-rapidapi-host': "imdb8.p.rapidapi.com",
'x-rapidapi-key': ""
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)```
需要在 RapidAPI Hub 上訂閱特定的 API。 您可以通過訪問 API 的定價頁面來做到這一點。 我相信您正在使用IMDb API 。 基本計划不包含此 IMDb API。
您可以按照以下步驟訂閱任何 API:
Search API -> Go to the Pricing page -> Choose a plan (according to your need) -> Click on Subscribe button.
訂閱后,您將能夠測試並連接到 API。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.