# Building a Real-Time Price Tracker With FourA

> URL: https://foura.ai/blog/building-a-real-time-price-tracker-with-foura
> Updated: 2026-09-27
> Index: https://foura.ai/llms.txt

Pricing decisions in e-commerce happen fast. A competitor drops their price by 5% and within hours, customers notice. The companies that win are the ones who notice first.

Building a price monitoring system used to require maintaining proxy infrastructure, dealing with bot detection, and writing custom scrapers for every target site. FourA collapses that complexity into a single API call.

## The Problem

Manual price checking doesn't scale. Even a small e-commerce business with 50 competitors needs to track hundreds of product pages. At three checks per day, that's over 1,000 requests daily, each potentially blocked, rate-limited, or broken by a site redesign.

## The Approach

Here's what a production-ready price monitoring pipeline looks like with FourA:

### 1. Define Your Product Catalog

Start with a structured list of competitor URLs and the CSS selectors where prices appear:

```python
products = [
    {"sku": "WDG-001", "competitor": "Store A", "url": "https://store-a.com/widget", "selector": ".price-current"},
    {"sku": "WDG-001", "competitor": "Store B", "url": "https://store-b.com/products/widget", "selector": "[data-price]"},
]
```

### 2. Fetch and Parse

FourA handles the hard parts: TLS fingerprinting, proxy rotation, and JavaScript rendering. Your code just sends a URL and gets HTML back:

```python
import requests
from bs4 import BeautifulSoup

def get_price(product):
    resp = requests.post("https://eu.api.foura.ai/api/v1/tasks", headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    }, json={"url": product["url"], "type": "proxy"})
    
    html = resp.json()["content"]
    soup = BeautifulSoup(html, "html.parser")
    el = soup.select_one(product["selector"])
    return float(el.text.strip().replace("$", "").replace(",", "")) if el else None
```

### 3. Track Changes Over Time

Store results in a database or CSV. Flag significant changes for alerts:

```python
if abs(new_price - last_price) / last_price > 0.03:  # 3% threshold
    send_alert(f"{product['competitor']} changed {product['sku']} from ${last_price} to ${new_price}")
```

### 4. Schedule with Cron

Run the tracker every hour or every few hours depending on your market's price volatility.

## Why This Works

- **No infrastructure to maintain.** No proxy servers, no browser farms, no IP rotation logic.
- **Adapts to protection changes.** FourA's proxy type automatically retries through different routes when one gets blocked.
- **Scales linearly.** Adding 100 more products is just 100 more API calls with no architectural changes needed.

## Getting Started

The whole pipeline above (minus the alert logic) runs in under 50 lines of Python. And once it's working for 50 products, scaling to 500 is just a longer list. The API call stays the same, the parsing stays the same, and the scheduling stays the same. That's the point.

The full example code is available in the [How-To guide](https://foura.ai/docs/how-to/monitor-competitor-prices), and the [API documentation](https://foura.ai/docs/api/endpoints) covers every parameter you'll need to customize it.
