Crime Data By ZipCode API

GRATIS CON POSSIBILITÀ DI UPGRADE
Da Zyla Labs | Aggiornamento 2 mesi fa | Data
Popolarità

9.5 / 10

Latenza

3,965ms

Livello di servizio

100%

Health Check

N/A

Torna a tutte le discussioni

python requests request failed with 503

Rapid account: NTGR 8 R
NTGR8R
10 mesi fa

Copy of your example and added my key:
import requests

url = “https://crime-data-by-zipcode-api.p.rapidapi.com/crime_data

querystring = {“zip”:“94109”}

headers = {
“X-RapidAPI-Key”: “177ca92fc3msh20a796fb7be565ep1d81d2jsn267ca7f44408”,
“X-RapidAPI-Host”: “crime-data-by-zipcode-api.p.rapidapi.com
}

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

Check if the request was successful

if response.status_code == 200:
print(‘Success!’)
else:
# Print an error message
print(f"Request failed with status code: {response.status_code}")

print(response.json())

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti