Findcheap for JavaScript

Price comparison in JavaScript and TypeScript

The Findcheap API in JavaScript and TypeScript: where the product on a page is sold for less. Node 18+ or a browser with fetch; no dependencies.

One client for every call: a search from a product page’s address, from a description in words or from a photo, a page read, and feedback. Free to start: 1,000 credits a month, no payment method required.

Install
npm install findcheap

Install it and search

npm install findcheap
export FINDCHEAP_API_KEY=fc_live_...   # from https://findcheap.ai/signin?next=/dashboard/keys

The key is free: create one in your dashboard.

TypeScript
import { Findcheap, FindcheapApiError } from "findcheap";

const fc = new Findcheap(); // reads FINDCHEAP_API_KEY; or new Findcheap({ apiKey: "fc_live_..." })

const answer = await fc.search("https://findcheap.ai/sample-product", { max_results: 3 });
console.log(answer.product.title, "read in", answer.search.market);
for (const card of answer.same_product) console.log(card.price, card.currency, card.retailer, card.url ?? card.resolve_id);

const page = await fc.extract("https://findcheap.ai/sample-product");
if (page.is_product_page) console.log(page.title, page.price, page.currency);

const link = await fc.resolve(answer.similar_products[0].resolve_id!); // for a card whose url is null

search and extract take an optional objective: what the shopper wants, in one sentence.

Results are sorted into two arrays, each containing up to 10 results:

  • same_product - listings that match the original product. Sorted by cheapest first.
  • similar_products - acceptable equivalents of the original product. Sorted by cheapest first.

Search from a description in words

searchProducts finds products from a description in words, for when there is no product page to start from:

TypeScript
const found = await fc.searchProducts("Insignia 32 inch Fire TV", { market: "US", max_price: 200 });
console.log(found.about_listings);
for (const card of found.listings) console.log(card.price, card.currency, card.retailer, card.url ?? card.resolve_id);

It answers up to 10 listings that match the words, cheapest first, and costs 10 credits, with or without listings. market is required: there is no address to infer it from. objective (what the shopper wants, in one sentence), min_price, max_price and max_results are optional.

Search from a photo

searchProducts also takes a photo in place of the words: image_url, a link to the photo, or image_base64, the photo’s file itself. Pass null as the query and send only one of the three. Use it when the shopper has a photo of the product and no words for it:

TypeScript
import { readFile } from "node:fs/promises";

const byLink = await fc.searchProducts(null, { market: "US", image_url: "https://example.com/photos/headphones.jpg" });

const image_base64 = (await readFile("photo.jpg")).toString("base64");
const byFile = await fc.searchProducts(null, { market: "US", image_base64 });

It answers up to 10 listings, cheapest first: listings that match the product in the photo and acceptable equivalent products. It usually answers in about 15 seconds and costs 10 credits, with or without listings. A file is a JPEG, PNG or WebP of 10 MB at most.

A photo you send is shared with the stores and search services Findcheap uses to run the search. A photo sent as image_base64 is redrawn before it is searched or kept: the data a camera stores in the file beside the picture (where and when it was taken, the device) is removed.

The methods

Search by URLfc.search()10Takes a product page URL as input and searches the internet to find where the product is available for a lower price.
Search by textfc.searchProducts()10Takes a description of a product in words as input and returns the listings that match it, cheapest first.
Search by imagefc.searchProducts()10Takes a photo of a product as input and returns listings that match the product in the photo and acceptable equivalent products, cheapest first.
Extractfc.extract()1Takes a product page URL as input and returns structured product data from the page.
Resolvefc.resolve()1Calling the Resolve endpoint with a resolve_id returns a direct link to the corresponding product on the merchant’s website and the merchant’s name.
Feedbackfc.feedback()0Sending feedback costs nothing, and the first report on a search gives 1 credit back.

The client returns the answer exactly as the API sends it, and ships its own type declarations. Every field of every answer is in the API reference.

Errors, timeouts and cancelling

Every answer opens with request_id and closes with credits_used. A failed call throws FindcheapApiError with status, type, message, credits_used, request_id and retry_after (seconds, on a 429); a call that never reached the API throws FindcheapConnectionError. Both extend FindcheapError.

Timeouts sit above the API’s own ceilings (a search answers within 60 seconds, a read within 30): 100, 40 and 20 seconds for search, extract and resolve, 20 for feedback, or one timeoutMs for every call. Pass your own signal to cancel a call.

Feedback on a search

feedback reports how a search went, by the request_id of its answer:

TypeScript
const report = await fc.feedback(answer.request_id, "partial", {
  useful_cards: [{ list: "same_product", position: 1 }],
  wrong_cards: [{ list: "similar_products", position: 2, reason: "not_equivalent" }],
  note: "The second similar listing is a smaller size.",
});
console.log(report.credits_refunded, "credit back,", report.refunded_today, "of", report.daily_refund_cap, "today");

The limits: one report per search, within 20 minutes of the search. The first report on a search gives 1 credit back, up to 100 credits a day per account. Sending feedback costs nothing.

In other stacks

The code and the issue tracker: https://github.com/llmbender/findcheap-sdks.

Countries and stores

Every call runs in a market, the country where the shopper is located.

USUSDAmazon, Walmart, eBay, AliExpress, Shein, and other sites
CACADAmazon, AliExpress, other sites
AUAUDAmazon, eBay, AliExpress, other sites
ININRAmazon, Flipkart, other sites
GLOBALUSDAmazon, eBay, AliExpress, other sites; the page is fetched from the store’s own country when its address names one

Benchmark results

PriceBench N=100 human-verified results: savings capture on the equivalent-product track, median search latency, and cost per search.

PriceBench results by agent
AgentSavings captureMedian search latencyCost per search
Findcheap92.8%15.6s$0.03
GPT-6 Astra43.9%87.5s$1.32
Perplexity34.1%74.7s$0.38
Claude Opus 520.2%232s$1.41
Gemini 3.1 Pro10.7%80s$0.08

PriceBench is an open source benchmark developed by Findcheap, to help fill the need for multimodal product search evals: github.com/llmbender/pricebench

What it costs

Free: 1,000 credits a month, no payment method. A search costs 10 credits. No overage charges.

Free$01,000 (100 searches)
Developer$19/month5,000 (500 searches)
Startup$99/month40,000 (4,000 searches)
Growth$499/month250,000 (25,000 searches)

FAQ

Is there a JavaScript or Node.js library that compares product prices across stores?
Yes: npm install findcheap. It is the Findcheap API in JavaScript and TypeScript: where the product on a page is sold for less. Findcheap takes a product page’s address and answers where the product is sold for less: the same product elsewhere, and acceptable equivalents, cheapest first.
Does it work with TypeScript?
Yes. It is the Findcheap API in JavaScript and TypeScript, and the package ships its own type declarations.
Which Node version does it need, and what does it depend on?
Node 18+ or a browser with fetch; no dependencies.
Can I call it from code that runs in a browser?
The client runs on Node 18+ or a browser with fetch. Every request carries an API key in the Authorization header, so code that runs in a visitor’s browser would hand that visitor your key: call the API from your server.
Where does the API key go?
new Findcheap() reads FINDCHEAP_API_KEY; or new Findcheap({ apiKey: “fc_live_...” }). A key is free: create one in your dashboard.
What happens when a call fails or is rate limited?
A failed call throws FindcheapApiError with status, type, message, credits_used, request_id and retry_after (seconds, on a 429); a call that never reached the API throws FindcheapConnectionError.
How long can a call take, and can I cancel one?
Timeouts sit above the API’s own ceilings (a search answers within 60 seconds, a read within 30): 100, 40 and 20 seconds for search, extract and resolve, 20 for feedback, or one timeoutMs for every call. Pass your own signal to cancel a call.
Is there a client for Python too?
Yes. Official clients for Python and JavaScript wrap the five calls: pip install findcheap and npm install findcheap.
What does a search cost?
A search costs 10 credits, with or without listings. Reading a product page without a search costs 1 credit.
Which countries and stores does it cover?
Five markets: the US, Canada, Australia, India and Global. The table above shows the marketplaces a search compares against in each.
Are the links affiliate links?
Paid plans carry no affiliate links: every link is the listing’s own address. On the Free plan, links to some retailers may be affiliate links.