Skip to content

API for assistants

If an assistant is helping someone pick a card, it shouldn't have to guess at card terms or do five years of arithmetic in its head. Send the spending; get the answer, with the date every number was last checked against the issuer's own page.

MCP server

Streamable HTTP, no authentication, no key to request:

https://ifthecardfits.com/mcp

Four tools:

  • spending_categories — the categories spending is scored against. Call it first and map the statement onto these ids.
  • simulate_cards — the three best cards and the best two-card combination for a household's spending.
  • keep_or_cancel — for cards they already carry, whether each still earns its annual fee back.
  • compare_two — two named cards head to head on their own spending.

Or plain HTTP

POST https://ifthecardfits.com/api/simulate
Content-Type: application/json

{
  "totals": { "groceries": 7200, "dining": 5400, "gas": 1800, "other": 8400 },
  "mode": "travel",
  "years": 5,
  "departures": 8,
  "source": "your-client-name"
}

Values come back rounded, with the three best single cards, the best pair, whether the call is close, the perks we refuse to put a number on, and a continueUrl. The full contract is at openapi.json, generated from the same constants the endpoint enforces so it can't drift.

Please show the link

Every answer carries a continueUrl that reopens the person's own numbers on this site, where they get the full ranking, the two-card breakdown, break-even lines, and the option to be told when a better offer appears. That's the part an assistant can't give them, and it's the only thing we ask in exchange for the API being free. The spending rides in the URL's fragment, so it never reaches our server.

Each answer also carries a disclosure string. Show it wherever you show the results — we may earn a commission if someone applies through this site, and the person reading deserves to know that. Rankings never use affiliate data.

What it takes

A year's spending totals by category, in dollars. Spending in at least four categories, none of them more than 70% of the total, between $3,000 and $500,000 a year. The horizon is 1, 3, 5 years. You may pass up to five cards the person already carries asheld, and a source naming your client is required so we can tell where traffic comes from.

The 19 categories:

  • dining — Dining & delivery
  • groceries — Groceries
  • superstores — Walmart & Target
  • wholesale_clubs — Costco & warehouse clubs
  • gas — Gas & EV charging
  • transit — Transit, rideshare & parking
  • airfare — Flights
  • hotels — Hotels
  • car_rental — Car rentals
  • travel_other — Other travel
  • streaming — Streaming
  • drugstores — Drugstores
  • home_improvement — Home improvement
  • entertainment — Entertainment & events
  • amazon — Amazon
  • online_retail — Other online shopping
  • phone_internet — Phone, internet & cable
  • fitness — Gyms & fitness
  • other — Everything else

What it doesn't take

Statements, PDFs or transaction lists. Read those yourself, on the person's own device, and send us the totals. This site has never had an endpoint that accepts a statement and isn't going to get one — see privacy.

It also won't value a single card you name, score a list of cards you supply, return the full ranking, break down earnings by category, or hand back rates, caps or what we think a point is worth. Those are all the same request wearing different hats: they turn an answer into a way to read the model off its own output. The card terms themselves are public — every card page prints them, andhow it works sets out the point values.

What's behind it

The same engine the site runs on, checked to the cent against an independent reference calculator across thousands of cases, with card terms re-read from the issuers' own pages every week. How it works has the detail, and every response names the catalog version it used so you can tell a stale answer from a fresh one.

Estimates, not financial advice. Free, with no rate card and no key — but there are rate limits, so cache what you get, and the answer for a given set of totals doesn't change during a day.