3-Minute Quickstart
CouponAPI is an Anycast-routed REST API that returns structured promotional data encoded in UTF-8 JSON.
Every request must be made over secure HTTPS and authenticate via an HTTP Authorization header. You can generate a free Sandbox token instantly from your Client Portal.
curl -X GET "https://couponapi.projectsfor.com/api/v1/coupons?limit=5" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json"
const response = await fetch("https://couponapi.projectsfor.com/api/v1/coupons?limit=5", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
});
const data = await response.json();
console.log(data.data);
import requests
url = "https://couponapi.projectsfor.com/api/v1/coupons"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
params = {"limit": 5, "store": "nike"}
response = requests.get(url, headers=headers, params=params)
print(response.json())
<?php
$ch = curl_init("https://couponapi.projectsfor.com/api/v1/coupons?limit=5");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_TOKEN"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data['data']);