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": "keeta.products.list", "input": { "category_id": "660", "location": { "latitude": 24.89377104655503, "longitude": 46.60596106427802 } }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "keeta.products.list", "input": { "category_id": "660", "location": { "latitude": 24.89377104655503, "longitude": 46.60596106427802 } }}''')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": "keeta.products.list", "input": { "category_id": "660", "location": { "latitude": 24.89377104655503, "longitude": 46.60596106427802 } }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Response
{ "store_id": "90015", "products": [ { "name": "Iced Coffee of the Day Colombia 12oz", "display_name": "Iced Coffee of the Day Colombia", "price": 1, "barcode": "00415", "currency": "SAR", "id": "10147503", "in_stock": true, "limit_buy_text": "Only 27 left in stock", "original_price": 9, "original_price_minor": 900, "sku_id": "10147503", "spec": "12oz", "stock_quantity": 27, "subcategory_id": "662", "subcategory_name": "Cold Coffee", "discounts": [ "First-order offer" ] }, { "name": "Matilda Cake 110g", "display_name": "Matilda Cake", "price": 13.5, "barcode": "05848", "currency": "SAR", "id": "10228822", "in_stock": true, "limit_buy_text": "Only 9 left in stock", "original_price": 16, "original_price_minor": 1600, "sku_id": "10228822", "spec": "110g", "stock_quantity": 9, "subcategory_id": "1364", "subcategory_name": "Best sellers", "discounts": [ "15% off" ] } ]}