curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "parkwhiz.parking.search", "input": { "end_time": "2027-10-12T20:00:00-05:00", "latitude": 41.881943, "longitude": -87.630976, "start_time": "2027-10-12T16:00:00-05:00" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "parkwhiz.parking.search", "input": { "end_time": "2027-10-12T20:00:00-05:00", "latitude": 41.881943, "longitude": -87.630976, "start_time": "2027-10-12T16:00:00-05:00" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "parkwhiz.parking.search", "input": { "end_time": "2027-10-12T20:00:00-05:00", "latitude": 41.881943, "longitude": -87.630976, "start_time": "2027-10-12T16:00:00-05:00" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Response
{ "distance_miles": 0.5, "search_type": "transient", "locations": [ { "name": "Kimpton Gray Chicago - Valet Kiosk", "address": "122 W. Monroe St.", "base_price": 50, "currency": "USD", "distance_meters": 149, "lat": 41.8807336078693, "location_id": 63898, "lon": -87.63175377622248, "site_url": "/p/chicago-parking/122-w-monroe-st-2", "total_price": 53.5, "cancellation": { "cancellable_now": true, "code": "cancellable_until_start_time", "message": "Anytime Cancellation: Cancel this booking for free up until the start time" }, "fees": [ { "amount": 3.5, "currency": "USD", "label": "Platform Fee" } ] }, { "name": "30 W. Monroe St. Garage", "address": "35 S. Dearborn St.", "base_price": 18, "currency": "USD", "distance_meters": 161, "lat": 41.88127251918902, "location_id": 11672, "lon": -87.62924820206537, "site_url": "/p/chicago-parking/35-s-dearborn-st", "total_price": 21.06, "cancellation": { "cancellable_now": true, "code": "cancellable_until_start_time", "message": "Anytime Cancellation: Cancel this booking for free up until the start time" }, "disclaimers": [ "Please do not park at the EV charging spots in case the lot is full." ], "fees": [ { "amount": 3.06, "currency": "USD", "label": "Platform Fee" } ] } ]}