# /openrice/coupons/search

`POST /api/openrice/coupons/search`

Price: 5 credits

Search OpenRice dining offers in a regional market: free restaurant coupons, paid cash vouchers, prepaid booking menus and merchant offers. Each offer returns its title, description, full terms and conditions, how to redeem it, artwork and dish photos, original and discounted price, discount type and value, remaining stock and sales counters, the validity window with the exact weekdays and time slots it can be used on plus the dates it is excluded on, and the restaurants it can be redeemed at. Filter by offer kind, keyword, restaurant, districts, landmarks, cuisines, dishes, restaurant types, category groups and seasonal promotions.

## How to use it

List OpenRice dining offers for a region. coupon_type selects coupon (free restaurant coupons), voucher (prepaid cash vouchers) or merchant_offer. Narrow with keyword, restaurant, district_ids, landmark_ids, cuisine_ids, dish_ids, amenity_ids, category_group_ids or promotion_ids — look ids up via openrice/facets for the same region. Each offer has coupon_title, description, terms, how_to_redeem, original_price and discount_price in the region's currency, discount_value, sold_count, quota and quota_left when the seller caps the run, starts_at, expires_at, valid_dates (weekdays and time slots), excluded_dates, image, dish_images and a restaurants list. Prepaid booking menus come back in the same shape but are keyed by booking_menu_id instead of a coupon id.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `region` (string) — OpenRice regional market the request is scoped to (default: "hongkong"; one of: "hongkong", "macau", "shenzhen", "guangzhou", "zhuhai", "dongguan", "foshan", "zhongshan", "taipei", "newtaipei-keelung", "taoyuan", "hsinchu-miaoli", "taichung", "changhua-nantou", "yunlin-chiayi", "tainan", "kaohsiung-pingtung", "eastern", "tokyo-kanto", "osaka-kobe", "kyoto-kinki", "nagoya-chubu", "hokkaido", "tohoku", "hiroshima-chugoku", "shikoku", "fukuoka-kyushu", "okinawa", "bangkok", "chonburi", "phuket", "prachuapkhirikhan", "chiangmai", "suratthani", "nakhonratchasima", "chiangrai", "others", "singapore", "manila")
- `lang` (string) — Content language for names, addresses and category labels (default: "en"; one of: "en", "tc", "sc", "tc-tw", "ja", "th", "id")
- `coupon_type` (string) — Which kind of offer to list (default: "coupon"; one of: "coupon", "voucher", "merchant_offer")
- `keyword` (string, nullable) — Free-text query over offer and restaurant names
- `restaurant` (string, nullable) — Only offers attached to this restaurant, given as a restaurant id or restaurant page URL (examples: "536198", "https://www.openrice.com/en/hongkong/r-sushi-masa-sheung-wan-r536198")
- `district_ids` (array, nullable) — District ids to match (any of); resolve ids via the openrice/facets endpoint
- `landmark_ids` (array, nullable) — Landmark / mall ids to match (any of); resolve ids via the openrice/facets endpoint
- `cuisine_ids` (array, nullable) — Cuisine ids to match (any of); resolve ids via the openrice/facets endpoint
- `dish_ids` (array, nullable) — Dish ids to match (any of); resolve ids via the openrice/facets endpoint
- `amenity_ids` (array, nullable) — Restaurant-type / amenity ids to match (any of); resolve ids via openrice/facets
- `category_group_ids` (array, nullable) — Cuisine or dish group ids to match (any of); resolve ids via the openrice/facets endpoint
- `promotion_ids` (array, nullable) — Seasonal promotion / award scheme ids to match (any of); ids come from the promotions list carried by restaurant cards and restaurant profiles
- `count` (integer, required) — Max number of offers to return (min: 1)

## Response

### 200 — Successful Response

- `@type` (string) (default: "OpenriceCoupon")
- `id` (integer, required)
- `url` (string, nullable)
- `coupon_title` (string, required)
- `subtitle` (string, nullable)
- `description` (string, nullable)
- `terms` (string, nullable)
- `how_to_redeem` (string, nullable)
- `coupon_type_id` (integer, nullable)
- `offer_id` (integer, nullable)
- `booking_menu_id` (integer, nullable)
- `offer_type_id` (integer, nullable)
- `offer_sub_type_id` (integer, nullable)
- `voucher_category_id` (integer, nullable)
- `redeem_method_id` (integer, nullable)
- `discount_type_id` (integer, nullable)
- `discount_value` (number, nullable)
- `discount_label` (string, nullable)
- `original_price` (number, nullable)
- `discount_price` (number, nullable)
- `original_price_text` (string, nullable)
- `discount_price_text` (string, nullable)
- `redemption_limit` (integer, nullable)
- `reference_no` (string, nullable)
- `quota` (integer, nullable)
- `quota_left` (integer, nullable)
- `pre_sales_hours` (integer, nullable)
- `valid_dates` (array) (default: [])
  - `@type` (string) (default: "OpenriceCouponValidDate")
  - `starts_at` (integer, nullable)
  - `expires_at` (integer, nullable)
  - `week_days` (array) (default: [])
  - `times` (array) (default: [])
- `excluded_dates` (array) (default: [])
  - `@type` (string) (default: "OpenriceCouponValidDate")
  - `starts_at` (integer, nullable)
  - `expires_at` (integer, nullable)
  - `week_days` (array) (default: [])
  - `times` (array) (default: [])
- `images` (array) (default: [])
- `image` (string, nullable)
- `dish_images` (array) (default: [])
- `restaurants` (array) (default: [])
  - `@type` (string) (default: "OpenriceCouponRestaurant")
  - `id` (integer, required)
  - `url` (string, required)
  - `name` (string, required)
  - `district` (object, nullable)
    - `@type` (string) (default: "OpenriceDistrict")
    - `id` (integer, required)
    - `name` (string, required)
    - `alias` (string, nullable)
    - `group_id` (integer, nullable)
    - `latitude` (number, nullable)
    - `longitude` (number, nullable)
  - `latitude` (number, nullable)
  - `longitude` (number, nullable)
  - `price_range_id` (integer, nullable)
  - `image` (string, nullable)
- `restaurant_display_name` (string, nullable)
- `district_name` (string, nullable)
- `starts_at` (integer, nullable)
- `expires_at` (integer, nullable)
- `redeem_ends_at` (integer, nullable)
- `published_at` (integer, nullable)
- `publish_ends_at` (integer, nullable)
- `bookmark_count` (integer, nullable)
- `sold_count` (integer, nullable)
- `sold_count_text` (string, nullable)
- `is_quota_enabled` (boolean) (default: false)
- `is_few_stock` (boolean) (default: false)
- `is_multi_restaurant` (boolean) (default: false)
- `is_valid_today` (boolean) (default: false)
- `is_printable` (boolean) (default: false)
- `has_alcohol_terms` (boolean) (default: false)

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

The entity was not found, or a precondition failed

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

