Guides / How to build

How to Build a Price Comparison Website: Data, Legal Limits and Revenue

How to build a price comparison website: where price data comes from, scraping and terms-of-service risks, matching products, fresh prices and affiliate income.

Mythex Team · 2026-09-29 · 6 min read

To build a price comparison website, pick a niche narrow enough to cover well, get price data from sources you're allowed to use (affiliate product feeds, retailer APIs or manual entry), match the same product across shops, refresh prices on a regular schedule, and show visitors when each price was last checked. Most comparison sites earn affiliate commission on click-throughs. The software is manageable. The hard parts are reliable data and staying within retailers' terms.

Start with a niche

Broad comparison of everything is a crowded, data-heavy business run by large companies. Small comparison sites work when they go deep on a niche where the big ones are thin:

  • A product category with confusing specs (e-bike batteries, 3D printer filament, specialist camera lenses)
  • A local market (gym memberships in one city, driving lessons in one region)
  • Services with complicated pricing (coworking day passes, self-storage units, van hire). Be aware that comparing financial products such as insurance or loans is regulated in many countries.
  • Second-hand or refurbished prices for a product family

A good niche has buyers who compare before purchasing, a manageable number of sellers, and data you can actually get.

Where the price data comes from

This decision shapes everything else.

SourceHow it worksProsCons
Affiliate product feedsRetailers publish product and price files through affiliate networks; you join their programmesPermitted use, includes tracking links for commissionApproval needed; feed quality varies; not every retailer takes part
Retailer or marketplace APIsOfficial APIs that return product and price dataStructured and reliableAccess rules, usage limits and display requirements
Manual entryYou or contributors enter prices through an admin pageWorks for small or local niches; full controlTime-consuming; goes stale without a routine
Seller submissionsBusinesses list and update their own pricesScales in service nichesYou need to verify accuracy
ScrapingYour code reads prices from retailers' web pagesCovers sites without feedsLegal and terms-of-service risk, breaks when pages change, often blocked

A word of caution on scraping

Many retailers' terms of service forbid automated collection of their content, and many use tools to detect and block it. Whether scraping is lawful depends on the country, the terms you've agreed to, how you access the site, and what you publish. Collecting data behind a login, ignoring a site's robots.txt, or sending heavy traffic adds more risk. Treat scraping as a last resort. Read each site's terms, ask for permission or use their feed or API where one exists, and take legal advice before you rely on scraped data. This guide isn't legal advice.

What the site needs

Data

  • Products: name, brand, model number or barcode, category, specs, image
  • Retailers: name, logo, delivery info, affiliate programme details
  • Offers: one row per product per retailer with price, currency, stock status, delivery cost, affiliate link, and last checked time
  • Price history (optional): past prices over time, for "lowest in 90 days" charts and alerts
  • Clicks: which offer a visitor clicked, so you can reconcile against affiliate reports

Pages

  • Category pages with filters on the specs people care about
  • Product pages with the offer table, sorted by total price including delivery
  • Search
  • Guides and comparisons written by you, which bring most of the search traffic
  • An admin area for managing products, retailers, matching and imports

Permissions

Visitors don't need accounts. Admin pages need a login and should be restricted to you and anyone who helps. If you add price alerts, users need an account or at least a verified email address.

Decisions and trade-offs

Matching products across retailers

The same product appears with different names at each shop. Match on a unique identifier such as a barcode or manufacturer part number where you have one; otherwise you need rules plus manual review. Build an admin screen for "possible matches" early, because matching errors (comparing a 64 GB model with a 128 GB one) destroy trust fast.

Keeping prices fresh

A stale price that's wrong at checkout annoys visitors and can break affiliate programme rules. You'll need something that re-imports feeds or re-checks prices on a schedule, which usually means a background job or a scheduler calling a protected import endpoint. See how to run background jobs. Always store and display "last checked", and hide or flag offers older than your freshness threshold.

Showing total price

Compare what the buyer will actually pay: price plus delivery, in the same currency, with any conditions ("members only", "with trade-in") shown clearly.

Revenue and disclosure

Affiliate commission is the usual model. Many countries require you to tell visitors clearly that you earn from links; put a short note near the offers and a fuller page explaining how you make money. Rank offers by the rule you state (usually lowest total price), not by commission, or say plainly if you do otherwise. Check the advertising rules where you operate. How to make money from an app covers other models.

A first prompt for an AI builder

Build a price comparison website called FilamentFinder for 3D printer filament in the UK. Data model: products (brand, material, colour, diameter, weight, barcode, image), retailers (name, logo, delivery cost, free-delivery threshold), and offers (product, retailer, price, stock status, affiliate URL, last_checked). Pages: home with search and popular categories; category pages filterable by material, diameter, colour and weight; product pages with an offer table sorted by total price including delivery, each showing "last checked" and hiding offers older than 48 hours. Clicking an offer records the click in the database, then redirects to the affiliate URL. Add an admin area behind a login where I can manage products and retailers, and import offers from a CSV file with a preview before saving. Show an affiliate disclosure near every offer table. Clean, fast, works well on phones.

CSV import first is deliberate: it lets you test the whole site with real data before building automatic feed imports.

Build it step by step

  1. Choose the niche and secure the data before building: join affiliate programmes or apply for API access.
  2. Build the data model and admin area, and import a first batch from CSV.
  3. Build category and product pages, and check sorting by total price with real offers.
  4. Add click tracking and compare it against your affiliate network's reports.
  5. Automate imports for each feed, with a log of what changed and what failed.
  6. Add freshness rules: hide old offers, and alert yourself when an import fails.
  7. Write the guides: buying guides and honest comparisons are how people find you. See SEO for AI-built websites.
  8. Add price history and alerts only once the core pages are working.

Common mistakes

  • Starting with scraping and building a business on data you're not allowed to use.
  • Too broad a niche, leaving thin pages with two offers each.
  • Wrong product matches, which make the site look careless.
  • Stale prices shown as current.
  • Missing or hidden affiliate disclosure.
  • Ranking by commission while claiming to show the best price.
  • Thin pages that are just a price table. Search engines and visitors both prefer pages with real guidance.

When a ready-made product is the better choice

If you mainly want affiliate income from a blog, the widgets and comparison tables many affiliate networks provide may be enough without your own database. WordPress with an affiliate or comparison plugin is a common route for content-led sites. Build your own when the niche needs custom filters, matching or data your tools can't handle, or when the comparison is the product rather than an add-on to articles. The directory website guide covers search and filters for listing sites in more depth.

Building it with Mythex

Mythex is an AI app builder: you describe the site, and it builds the data model, category and product pages, admin area and CSV import in a live preview, then publishes to a public URL. It adds a dedicated Postgres database when the site needs to store products and offers. Feeds and retailer APIs are integrated with your own keys stored as project secrets; see integrate any API.

Two things to plan for. Mythex's docs don't cover scheduled jobs, so work out with the agent how price refreshes will be triggered, for example an external scheduler calling a protected import endpoint. And Mythex won't settle whether you may collect a site's data; that's between you, the retailer and your adviser. On Pro you can connect a custom domain. For layout ideas, browse the website templates.

Questions

Is it legal to scrape prices for a comparison website?

It depends on the site's terms of service, how you collect the data, what you do with it and the law where you operate. Many retailers forbid scraping in their terms and actively block it. Prefer affiliate feeds and official APIs, and take legal advice before building a business on scraped data.

How do price comparison websites make money?

Most earn affiliate commission when a visitor clicks through and buys. Others charge retailers for listings or clicks, or show ads. Affiliate links must be disclosed to visitors in many countries.

Where do price comparison sites get their data?

Usually from product feeds supplied through affiliate networks, from retailers' own APIs, from manual entry for small niches, and sometimes from scraping where that is permitted.

How often should prices be updated?

As often as prices change in your niche and your data source allows. Show when each price was last checked, and remove or flag prices that are too old rather than showing them as current.

Keep reading

  • How to Build a Blog with AI: Posts, Editor, SEO and Hosting — Build your own blog with an AI app builder: posts, an editor, categories, newsletter signup and SEO search engines can read, plus when a platform fits better.
  • How to Build a Booking App: Slots, Availability, Reminders and Deposits — How to build a booking app with AI: services, availability and time slots, double-booking rules, time zones, reminders, deposits, and when Calendly is enough.
  • How to Build a Budget App: Categories, Transactions, Imports and Reports — Build a personal or household budget app: budgeting methods, transactions, CSV imports vs bank connections, handling money correctly, and privacy.
  • How to Build a Changelog Page: Entries, Tags, RSS and 'What's New' — How to build a product changelog page: what each entry needs, files vs database, tags, RSS, email updates, an in-app 'what's new' badge, and writing tips.
  • How to Build a Church Website: Services, Sermons, Events and Giving — How to build a church website that helps visitors find you: service times, sermons, events, online giving, privacy for members and children, and an AI prompt.
  • How to Build a Client Portal: Files, Status, Invoices and Permissions — How to build a client portal where clients see project status, files, requests and invoices, with the permissions, data and security choices that keep it safe.

Start building free · Templates · Docs