Partner API · Early access

The Partner API

For companies building their own screens. Your server calls Tripp, and Tripp does the travel work: real searches, ranked by the all-in price.

The Partner API is in early access. Keys are issued by hand. Apply to get one. Pricing is set per partner during early access, and agreed before live keys are issued.

Keys

A key has an id (starts key_) and a secret. The id names the key; the secret signs your requests and is never sent. Keep the secret on your server, never in a web page or a mobile app.

  • Sandbox keys are for building. Live keys are for your customers.
  • Each key is allowed specific things, for example search. A key without the right permission gets 403.
  • Nothing in the API moves money yet. Every call is a search or a lookup.

Signing a request

Every request carries three headers:

HeaderValue
AuthorizationBearer key_... (your key id)
X-Tripp-TimestampThe time now, in unix seconds
X-Tripp-SignatureHex HMAC-SHA256, keyed with your secret, over the text below

The signed text is the timestamp, the method, and the path, each followed by a newline, then the exact body bytes you send (nothing for a GET):

1791234567\nPOST\n/api/partner/v1/search/flights\n{"origin":"SFO",...}

In Python:

import hashlib, hmac, json, time, requests

KEY_ID, SECRET = "key_...", "..."
BASE = "https://heytripp.com"

def call(method, path, body=None):
    raw = json.dumps(body).encode() if body is not None else b""
    ts = str(int(time.time()))
    msg = f"{ts}\n{method}\n{path}\n".encode() + raw
    sig = hmac.new(SECRET.encode(), msg, hashlib.sha256).hexdigest()
    return requests.request(method, BASE + path, data=raw or None, headers={
        "Authorization": f"Bearer {KEY_ID}",
        "X-Tripp-Timestamp": ts,
        "X-Tripp-Signature": sig,
        "Content-Type": "application/json",
        "User-Agent": "yourco-server/1.0",
    })

A timestamp more than 5 minutes from Tripp's clock is refused, so a captured request cannot be replayed later.

Send a User-Agent that names your company, for example yourco-server/1.0. Our network refuses some library defaults, such as Python's built-in urllib, before the request reaches Tripp.

Check your key

GET /api/partner/v1/ping
{ "partner_id": "yourco", "mode": "sandbox", "scopes": ["search"] }

Search flights

POST /api/partner/v1/search/flights

{ "origin": "SFO", "destination": "LAX",
  "depart_date": "2026-11-12", "return_date": "2026-11-15",
  "passengers": 2 }
FieldWhat it is
origin, destinationRequired. Airport codes or city names.
depart_dateRequired. YYYY-MM-DD. Tripp never assumes a date.
return_dateOptional. Leave out for one way.
passengersAdults. Default 1.
children_ages, infantsOptional. Ages as "7,4"; infants on a lap.
cabin, max_stopsOptional. economy, premium, business, first; 0 for nonstop.
budget_maxOptional. The party's ceiling; the answer says whether the lead fare is over it.

The answer lists options, ranked by the all-in price for the whole party (a carry-on each included), not the headline fare. Each option carries airline, flight_number, legs, price and currency; price_covers says what the price is for, such as total for 2 travelers. When bags cost extra, all_in_price gives the total with them; when it is null, price is already the all-in total. status is ok, or a plain reason such as no_flights with a message you can show as is.

Errors

CodeMeaning
401Missing headers, an old timestamp, an unknown key or a bad signature.
403The key is not allowed to do this.
422needs_input: something is missing or unusable. The message is the question to ask your customer, for example which date they meant.
429Too many requests for this key. Wait a minute.
502The search did not complete. Nothing is made up; try again.

Limits

30 requests a minute per key during early access. Tell us if you need more.

Coming next

  • Hotel search, cheapest week, and hotel facts.
  • Tripp's fare comparison across public sites.
  • Booking, paid by your company, then price watches.
  • Webhooks, so you hear about changes without asking.

Help

Email [email protected] and a person on the Tripp team will answer.