import requests # Set your API key here to authenticateheaders ={"Authorization":"Bearer shard-xxx"}# URL for fetching jokes.url ="https://api.shard-ai.xyz/v1/fun/facts?count=1"# Send the request to fetch a factresponse = requests.get(url, headers=headers)# Print all those juicy facts!print(response.json())
Pro tip: The "count" parameter can be up to 10!
["Did you know, Shard API is the best API? 😅"]
This error means you have exceeded your rate limit! For basic users, your rate limit is a global limit of 15 requests a minute. Upgrade to premium to get more.
{"error": {"message":"Something went wrong, try again later.","type":"error","param": None,"code": None }}// Sorry, something went wrong, you can try contacting us @ discord.gg/ligma!