Groupon deal search
Groupon deals matching a keyword near a US city or a point: id, title, link, merchant and its rating, price, original price, discount, promo code with its price and end date, cash back, rating and count, badges, closest location with coordinates and the number of locations, images and sponsored flag, plus the facets (brands, categories, locations and more) on the first page. Sort by relevance, price, distance or rating. Pass next_offset back as offset; null on the last page.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
qrequired | string | Search keyword. Example: massage |
location | string | City slug (chicago, new-york, los-angeles, san-francisco, houston, dallas, austin, seattle, denver, atlanta, miami, boston, washington, phoenix, las-vegas and other large US cities). Default chicago. Ignored when lat and lng are given. |
lat | number | Latitude to search around (with lng). |
lng | number | Longitude to search around (with lat). |
sort | relevance | price_asc | price_desc | distance | rating | Order of the deals. Default relevance. |
offset | integer | Number of deals to skip (the next_offset of the previous page). |
limit | integer | Deals per page, 1-50. Default 24. |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/groupon/v1/search?q=massage" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/groupon/v1/search",
params={"q": "massage"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/groupon/v1/search");
url.searchParams.set("q", "massage");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).