HungerStation Market Product
hungerstation.product.get
One product's details from its branch, SKU and name: description, price, original price and active offer.
At a glance
- Endpoint ID
hungerstation.product.get- Price
- By request
- Runs for up to
- 30 seconds
Request
Send the endpoint ID as capability and its fields as input. Set UPSCRAPE_API_KEY to your key first.
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": "hungerstation.product.get", "input": { "branch_id": 56617, "name": "Almarai Nijoom Strawberry Flavoured Milk 18×150Ml", "sku": "0NMXXS" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "hungerstation.product.get", "input": { "branch_id": 56617, "name": "Almarai Nijoom Strawberry Flavoured Milk 18×150Ml", "sku": "0NMXXS" }}''')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": "hungerstation.product.get", "input": { "branch_id": 56617, "name": "Almarai Nijoom Strawberry Flavoured Milk 18×150Ml", "sku": "0NMXXS" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
branch_id |
integer | yes | The store branch number, as product search returns it. | 56617 |
sku |
string | yes | The product's SKU, as product search returns it. | 0NMXXS |
name |
string | no | The product's name, as product search returns it. | Almarai Nijoom Strawberry Flavoured Milk 18×150… |
Response
A finished call answers with HTTP 200; the data is in results[0].data, and billing.credits_charged is what it cost. A call still running after the wait answers 202: see jobs and results.
This is results[0].data from a real run:
{ "product": { "name": "Almarai Nijoom Strawberry Flavoured Milk 18×150Ml", "price": 23.94, "description": "Almarai Nijoom Strawberry Flavored Milk 18x150ml - Delicious strawberry flavored milk.", "id": "06a9cd06-71f1-4fbf-a918-1985ab36fe3c", "is_best_seller": false, "original_price": 26.91, "sku": "0NMXXS", "active_promotions": [ { "discount_type": "PERCENTAGE", "discount_value": 11, "quantity": 1, "weighted_discount_value": 0 } ], "category_ids": [ "8b236404-84c9-4153-9a19-e14ee8ce88a3", "2f547d73-ab5b-41af-a70d-52d3e5df799d" ] }, "vendor": { "name": "HungerStation Market", "branch_id": 56617, "external_id": "6f2f8ff4-c375-49cb-8ea2-d1a8ed179900" }}
Fields
| Field | Type | What it is | Example |
|---|---|---|---|
product.active_promotions[].discount_type |
string | PERCENTAGE | |
product.active_promotions[].discount_value |
integer | 11 | |
product.active_promotions[].quantity |
integer | 1 | |
product.active_promotions[].weighted_discount_value |
integer | 0 | |
product |
object | The product's details. | 9 fields |
product.name |
string | The name of the category or product. | Almarai Nijoom Strawberry Flavoured Milk 18×150Ml |
product.price |
number | The price. | 23.94 |
product.original_price |
number | The price before the discount. | 26.91 |
product.description |
string | The product's description. | Almarai Nijoom Strawberry Flavored Milk 18x150ml - Delicious st… |
product.sku |
string | The product's code. | 0NMXXS |
product.active_promotions |
array | Promotions running on the product. | 1 records |
product.category_ids |
array | The categories the product is in. | 8b236404-84c9-4153-9a19-e14ee8ce88a3, 2f547d73-ab5b-41af-a70d-5… |
product.id |
string | HungerStation's ID for it. | 06a9cd06-71f1-4fbf-a918-1985ab36fe3c |
product.is_best_seller |
boolean | Whether HungerStation marks it a best seller. | false |
vendor |
object | The store that sells it. | 3 fields |
vendor.name |
string | The name of the category or product. | HungerStation Market |
vendor.branch_id |
integer | The store branch the result is for. | 56,617 |
vendor.external_id |
string | 6f2f8ff4-c375-49cb-8ea2-d1a8ed179900 |
If a call fails
A failed call costs nothing. The response carries an error.code you can branch on; Errors and retries lists every code and which ones to retry.
Other HungerStation Market endpoints
Something missing or unclear? Ask the team that builds the HungerStation Market endpoints.