curl --request POST \
--url https://api.anysite.io/api/openrice/coupons/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"count": 2,
"timeout": 300,
"region": "hongkong",
"lang": "en",
"coupon_type": "coupon",
"keyword": "<string>",
"restaurant": "<string>",
"district_ids": [
123
],
"landmark_ids": [
123
],
"cuisine_ids": [
123
],
"dish_ids": [
123
],
"amenity_ids": [
123
],
"category_group_ids": [
123
],
"promotion_ids": [
123
]
}
'import requests
url = "https://api.anysite.io/api/openrice/coupons/search"
payload = {
"count": 2,
"timeout": 300,
"region": "hongkong",
"lang": "en",
"coupon_type": "coupon",
"keyword": "<string>",
"restaurant": "<string>",
"district_ids": [123],
"landmark_ids": [123],
"cuisine_ids": [123],
"dish_ids": [123],
"amenity_ids": [123],
"category_group_ids": [123],
"promotion_ids": [123]
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
count: 2,
timeout: 300,
region: 'hongkong',
lang: 'en',
coupon_type: 'coupon',
keyword: '<string>',
restaurant: '<string>',
district_ids: [123],
landmark_ids: [123],
cuisine_ids: [123],
dish_ids: [123],
amenity_ids: [123],
category_group_ids: [123],
promotion_ids: [123]
})
};
fetch('https://api.anysite.io/api/openrice/coupons/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/openrice/coupons/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'count' => 2,
'timeout' => 300,
'region' => 'hongkong',
'lang' => 'en',
'coupon_type' => 'coupon',
'keyword' => '<string>',
'restaurant' => '<string>',
'district_ids' => [
123
],
'landmark_ids' => [
123
],
'cuisine_ids' => [
123
],
'dish_ids' => [
123
],
'amenity_ids' => [
123
],
'category_group_ids' => [
123
],
'promotion_ids' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/openrice/coupons/search"
payload := strings.NewReader("{\n \"count\": 2,\n \"timeout\": 300,\n \"region\": \"hongkong\",\n \"lang\": \"en\",\n \"coupon_type\": \"coupon\",\n \"keyword\": \"<string>\",\n \"restaurant\": \"<string>\",\n \"district_ids\": [\n 123\n ],\n \"landmark_ids\": [\n 123\n ],\n \"cuisine_ids\": [\n 123\n ],\n \"dish_ids\": [\n 123\n ],\n \"amenity_ids\": [\n 123\n ],\n \"category_group_ids\": [\n 123\n ],\n \"promotion_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/openrice/coupons/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"count\": 2,\n \"timeout\": 300,\n \"region\": \"hongkong\",\n \"lang\": \"en\",\n \"coupon_type\": \"coupon\",\n \"keyword\": \"<string>\",\n \"restaurant\": \"<string>\",\n \"district_ids\": [\n 123\n ],\n \"landmark_ids\": [\n 123\n ],\n \"cuisine_ids\": [\n 123\n ],\n \"dish_ids\": [\n 123\n ],\n \"amenity_ids\": [\n 123\n ],\n \"category_group_ids\": [\n 123\n ],\n \"promotion_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/openrice/coupons/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"count\": 2,\n \"timeout\": 300,\n \"region\": \"hongkong\",\n \"lang\": \"en\",\n \"coupon_type\": \"coupon\",\n \"keyword\": \"<string>\",\n \"restaurant\": \"<string>\",\n \"district_ids\": [\n 123\n ],\n \"landmark_ids\": [\n 123\n ],\n \"cuisine_ids\": [\n 123\n ],\n \"dish_ids\": [\n 123\n ],\n \"amenity_ids\": [\n 123\n ],\n \"category_group_ids\": [\n 123\n ],\n \"promotion_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": 123,
"coupon_title": "<string>",
"@type": "OpenriceCoupon",
"url": "<string>",
"subtitle": "<string>",
"terms": "<string>",
"how_to_redeem": "<string>",
"coupon_type_id": 123,
"offer_id": 123,
"booking_menu_id": 123,
"offer_type_id": 123,
"offer_sub_type_id": 123,
"voucher_category_id": 123,
"redeem_method_id": 123,
"discount_type_id": 123,
"discount_value": 123,
"discount_label": "<string>",
"original_price": 123,
"discount_price": 123,
"original_price_text": "<string>",
"discount_price_text": "<string>",
"redemption_limit": 123,
"reference_no": "<string>",
"quota": 123,
"quota_left": 123,
"pre_sales_hours": 123,
"valid_dates": [],
"excluded_dates": [],
"images": [],
"image": "<string>",
"dish_images": [],
"restaurants": [],
"restaurant_display_name": "<string>",
"district_name": "<string>",
"starts_at": 123,
"expires_at": 123,
"redeem_ends_at": 123,
"published_at": 123,
"publish_ends_at": 123,
"bookmark_count": 123,
"sold_count": 123,
"sold_count_text": "<string>",
"is_quota_enabled": false,
"is_few_stock": false,
"is_multi_restaurant": false,
"is_valid_today": false,
"is_printable": false,
"has_alcohol_terms": false
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}/openrice/coupons/search
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.
Price: 5 credits per 12 results
curl --request POST \
--url https://api.anysite.io/api/openrice/coupons/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"count": 2,
"timeout": 300,
"region": "hongkong",
"lang": "en",
"coupon_type": "coupon",
"keyword": "<string>",
"restaurant": "<string>",
"district_ids": [
123
],
"landmark_ids": [
123
],
"cuisine_ids": [
123
],
"dish_ids": [
123
],
"amenity_ids": [
123
],
"category_group_ids": [
123
],
"promotion_ids": [
123
]
}
'import requests
url = "https://api.anysite.io/api/openrice/coupons/search"
payload = {
"count": 2,
"timeout": 300,
"region": "hongkong",
"lang": "en",
"coupon_type": "coupon",
"keyword": "<string>",
"restaurant": "<string>",
"district_ids": [123],
"landmark_ids": [123],
"cuisine_ids": [123],
"dish_ids": [123],
"amenity_ids": [123],
"category_group_ids": [123],
"promotion_ids": [123]
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
count: 2,
timeout: 300,
region: 'hongkong',
lang: 'en',
coupon_type: 'coupon',
keyword: '<string>',
restaurant: '<string>',
district_ids: [123],
landmark_ids: [123],
cuisine_ids: [123],
dish_ids: [123],
amenity_ids: [123],
category_group_ids: [123],
promotion_ids: [123]
})
};
fetch('https://api.anysite.io/api/openrice/coupons/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/openrice/coupons/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'count' => 2,
'timeout' => 300,
'region' => 'hongkong',
'lang' => 'en',
'coupon_type' => 'coupon',
'keyword' => '<string>',
'restaurant' => '<string>',
'district_ids' => [
123
],
'landmark_ids' => [
123
],
'cuisine_ids' => [
123
],
'dish_ids' => [
123
],
'amenity_ids' => [
123
],
'category_group_ids' => [
123
],
'promotion_ids' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/openrice/coupons/search"
payload := strings.NewReader("{\n \"count\": 2,\n \"timeout\": 300,\n \"region\": \"hongkong\",\n \"lang\": \"en\",\n \"coupon_type\": \"coupon\",\n \"keyword\": \"<string>\",\n \"restaurant\": \"<string>\",\n \"district_ids\": [\n 123\n ],\n \"landmark_ids\": [\n 123\n ],\n \"cuisine_ids\": [\n 123\n ],\n \"dish_ids\": [\n 123\n ],\n \"amenity_ids\": [\n 123\n ],\n \"category_group_ids\": [\n 123\n ],\n \"promotion_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/openrice/coupons/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"count\": 2,\n \"timeout\": 300,\n \"region\": \"hongkong\",\n \"lang\": \"en\",\n \"coupon_type\": \"coupon\",\n \"keyword\": \"<string>\",\n \"restaurant\": \"<string>\",\n \"district_ids\": [\n 123\n ],\n \"landmark_ids\": [\n 123\n ],\n \"cuisine_ids\": [\n 123\n ],\n \"dish_ids\": [\n 123\n ],\n \"amenity_ids\": [\n 123\n ],\n \"category_group_ids\": [\n 123\n ],\n \"promotion_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/openrice/coupons/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"count\": 2,\n \"timeout\": 300,\n \"region\": \"hongkong\",\n \"lang\": \"en\",\n \"coupon_type\": \"coupon\",\n \"keyword\": \"<string>\",\n \"restaurant\": \"<string>\",\n \"district_ids\": [\n 123\n ],\n \"landmark_ids\": [\n 123\n ],\n \"cuisine_ids\": [\n 123\n ],\n \"dish_ids\": [\n 123\n ],\n \"amenity_ids\": [\n 123\n ],\n \"category_group_ids\": [\n 123\n ],\n \"promotion_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": 123,
"coupon_title": "<string>",
"@type": "OpenriceCoupon",
"url": "<string>",
"subtitle": "<string>",
"terms": "<string>",
"how_to_redeem": "<string>",
"coupon_type_id": 123,
"offer_id": 123,
"booking_menu_id": 123,
"offer_type_id": 123,
"offer_sub_type_id": 123,
"voucher_category_id": 123,
"redeem_method_id": 123,
"discount_type_id": 123,
"discount_value": 123,
"discount_label": "<string>",
"original_price": 123,
"discount_price": 123,
"original_price_text": "<string>",
"discount_price_text": "<string>",
"redemption_limit": 123,
"reference_no": "<string>",
"quota": 123,
"quota_left": 123,
"pre_sales_hours": 123,
"valid_dates": [],
"excluded_dates": [],
"images": [],
"image": "<string>",
"dish_images": [],
"restaurants": [],
"restaurant_display_name": "<string>",
"district_name": "<string>",
"starts_at": 123,
"expires_at": 123,
"redeem_ends_at": 123,
"published_at": 123,
"publish_ends_at": 123,
"bookmark_count": 123,
"sold_count": 123,
"sold_count_text": "<string>",
"is_quota_enabled": false,
"is_few_stock": false,
"is_multi_restaurant": false,
"is_valid_today": false,
"is_printable": false,
"has_alcohol_terms": false
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API token from the dashboard
Headers
Body
x >= 120 <= x <= 1500hongkong, 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 en, tc, sc, tc-tw, ja, th, id coupon, voucher, merchant_offer Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes