# Price comparison in Python

> The findcheap package for Python: the install line and the key, a search from a product page's address with a page read and a link resolved, a search from a description in words and from a photo, every method with its call and credits, errors and timeouts, feedback on a search, the markets, benchmark results, plans and common questions. The same page for people: https://findcheap.ai/developers/use-cases/price-comparison-python. Index: https://findcheap.ai/llms.txt. The MCP server reference: https://findcheap.ai/developers/mcp.md. The API reference: https://findcheap.ai/developers/docs.md.

The Findcheap API in Python: where the product on a page is sold for less. Standard library only, Python 3.9+.

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: `pip install findcheap`

## Install it and search

```
pip 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](https://findcheap.ai/signin?next=/dashboard/keys).

Python:

```
from findcheap import Findcheap, FindcheapApiError

fc = Findcheap()  # reads FINDCHEAP_API_KEY; or Findcheap(api_key="fc_live_...")

answer = fc.search("https://findcheap.ai/sample-product", max_results=3)
print(answer["product"]["title"], "read in", answer["search"]["market"])
for card in answer["same_product"]:
    print(card["price"], card["currency"], card["retailer"], card["url"] or card["resolve_id"])

page = fc.extract("https://findcheap.ai/sample-product")
if page["is_product_page"]:
    print(page["title"], page["price"], page["currency"])

link = fc.resolve(answer["similar_products"][0]["resolve_id"])  # for a card whose url is None
```

`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

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

Python:

```
found = fc.search_products("Insignia 32 inch Fire TV", market="US", max_price=200)
print(found["about_listings"])
for card in found["listings"]:
    print(card["price"], card["currency"], card["retailer"], card["url"] or 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

`search_products` also takes a photo in place of the words: `image_url`, a link to the photo, or `image_base64`, the photo's file itself. Send only one of the three. Use it when the shopper has a photo of the product and no words for it:

Python:

```
import base64

found = fc.search_products(market="US", image_url="https://example.com/photos/headphones.jpg")

with open("photo.jpg", "rb") as photo:
    found = fc.search_products(market="US", image_base64=base64.b64encode(photo.read()).decode())
```

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

| Call | Method | Credits | What it does |
| --- | --- | --- | --- |
| Search by URL | `fc.search()` | 10 | Takes a product page URL as input and searches the internet to find where the product is available for a lower price. |
| Search by text | `fc.search_products()` | 10 | Takes a description of a product in words as input and returns the listings that match it, cheapest first. |
| Search by image | `fc.search_products()` | 10 | Takes a photo of a product as input and returns listings that match the product in the photo and acceptable equivalent products, cheapest first. |
| Extract | `fc.extract()` | 1 | Takes a product page URL as input and returns structured product data from the page. |
| Resolve | `fc.resolve()` | 1 | Calling 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. |
| Feedback | `fc.feedback()` | 0 | Sending 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. Every field of every answer is in the [API reference](https://findcheap.ai/developers/docs.md).

## Errors and timeouts

Every answer opens with `request_id` and closes with `credits_used`. A failed call raises `FindcheapApiError` with `.status`, `.type`, `.message`, `.credits_used`, `.request_id` and `.retry_after` (seconds, on a 429); a call that never reached the API raises `FindcheapConnectionError`. Both subclass `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 `timeout=` for every call.

## Feedback on a search

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

Python:

```
report = 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.",
)
print(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

- JavaScript and TypeScript: [the same client, from npm](https://findcheap.ai/developers/use-cases/price-comparison-javascript.md).
- A LangChain agent: [the same calls as tools](https://findcheap.ai/developers/use-cases/langchain-price-comparison.md).
- An assistant such as ChatGPT, Claude or Cursor: [the Findcheap MCP server](https://findcheap.ai/developers/use-cases/price-comparison-mcp-server.md).
- Any other language: [every call, with its endpoint and its credits](https://findcheap.ai/developers/use-cases/price-comparison-api.md).

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

## Countries and stores

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

| Market | Currency | Marketplaces Search by URL compares against |
| --- | --- | --- |
| US | USD | Amazon, Walmart, eBay, AliExpress, Shein, and other sites |
| CA | CAD | Amazon, AliExpress, other sites |
| AU | AUD | Amazon, eBay, AliExpress, other sites |
| IN | INR | Amazon, Flipkart, other sites |
| GLOBAL | USD | Amazon, 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.

| Agent | Savings capture | Median search latency | Cost per search |
| --- | --- | --- | --- |
| Findcheap | 92.8% | 15.6s | $0.03 |
| GPT-6 Astra | 43.9% | 87.5s | $1.32 |
| Perplexity | 34.1% | 74.7s | $0.38 |
| Claude Opus 5 | 20.2% | 232s | $1.41 |
| Gemini 3.1 Pro | 10.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](https://github.com/llmbender/pricebench)

## What it costs

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

| Plan | Price | Credits a month |
| --- | --- | --- |
| Free | $0 | 1,000 (100 searches) |
| Developer | $19/month | 5,000 (500 searches) |
| Startup | $99/month | 40,000 (4,000 searches) |
| Growth | $499/month | 250,000 (25,000 searches) |

Start for free: https://findcheap.ai/signin. Plans and pricing: https://findcheap.ai/developers/pricing.

## FAQ

**Is there a Python library that compares product prices across stores?** Yes: pip install findcheap. It is the Findcheap API in Python: 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.

**Which Python versions does it need, and what does it depend on?** Standard library only, Python 3.9+.

**Where does the API key go?** Findcheap() reads FINDCHEAP_API_KEY; or Findcheap(api_key="fc_live_..."). A key is free: create one in your dashboard.

**What happens when a call fails or is rate limited?** A failed call raises FindcheapApiError with .status, .type, .message, .credits_used, .request_id and .retry_after (seconds, on a 429); a call that never reached the API raises FindcheapConnectionError.

**How long can a call take?** 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 timeout= for every call.

**Can it search from a photo?** Yes. search_products also takes a photo in place of the words: image_url, a link to the photo, or image_base64, the photo's file itself. A file is a JPEG, PNG or WebP of 10 MB at most.

**Is there a client for JavaScript 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.
