Pointify

Guides

Deals widget

Add a module with today's strongest travel deals and the routes travelers are searching for. These endpoints return real data even with a test key.

Step 1: Fetch hot deals

GET /v1/deals/feed/hot returns the biggest savings right now, paged. Each deal has the same shape as the deal feed.

curl "https://api.pointifytravels.com/v1/deals/feed/hot?page_size=5" \
  -H "Authorization: Bearer $POINTIFY_API_KEY"
One deal
{
  "id": "d_7731",
  "title": "New York to Lisbon from $389 round trip",
  "origin": "JFK",
  "destination": "LIS",
  "price_cash": 389,
  "price_points": null,
  "airline": "TAP Air Portugal",
  "deal_type": "cash",
  "deal_url": "https://pointifytravels.com/deals/…",
  "savings_pct": 46,
  "is_hot": true,
  "source": "pointify",
  "expiration_date": "2027-01-19"
}

GET /v1/trending returns the most searched routes over a recent window. Pass origin to show what people near your user are searching.

curl "https://api.pointifytravels.com/v1/trending?limit=5" \
  -H "Authorization: Bearer $POINTIFY_API_KEY"

Step 3: Serve it from your backend

The API does not accept browser calls, so fetch on your server and send your front end the result. Deals do not change by the second; caching for a few minutes keeps you well inside your quota.

TypeScript
// app/api/deals/route.ts (Next.js). Runs on your server, so the key stays secret.
export const revalidate = 600; // cache for 10 minutes

export async function GET() {
  const headers = { Authorization: `Bearer ${process.env.POINTIFY_API_KEY}` };
  const [hot, trending] = await Promise.all([
    fetch("https://api.pointifytravels.com/v1/deals/feed/hot?page_size=5", { headers, next: { revalidate: 600 } }),
    fetch("https://api.pointifytravels.com/v1/trending?limit=5", { headers, next: { revalidate: 600 } }),
  ]);
  if (!hot.ok || !trending.ok) {
    return Response.json({ deals: [], routes: [] }, { status: 502 });
  }
  const { deals } = await hot.json();
  const { routes } = await trending.json();
  return Response.json({ deals, routes });
}

What to show users

  • The deal title, price and savings_pct, with a badge when is_hot is true.
  • The expiry date from expiration_date, and a link to deal_url.
  • Trending routes as origin to destination, ordered as returned.

Ready to find your best fare?

Create a free account to save your travel plans and explore cash and points options.

Create Free Account