Skip to main content
Piloterr
Back to blog
July 28, 2026

Web scraping for brand protection: hunting counterfeits on AliExpress, Alibaba, and Amazon

Counterfeiting is not a niche problem. The OECD estimates trade in fake goods at hundreds of billions of dollars per year, and most of it now flows through the same channels your customers use daily: AliExpress, Alibaba, Amazon, eBay, Temu, and social commerce. For a brand, every counterfeit listing is lost revenue, a safety liability, and a dilution of the trademark you spent years building.

The teams fighting this (in-house IP departments and specialized brand protection platforms) all face the same operational problem: infringing listings appear faster than humans can find them, and sellers re-list within days of a takedown. The answer is not more analysts pasting URLs into spreadsheets. It is an automated detection pipeline built on reliable marketplace data.

This article shows how that pipeline works in practice, using a real production pattern from one of our customers (a brand protection platform we will not name), with concrete API calls on AliExpress, Alibaba, and Amazon.

The use case: a brand protection platform at scale

One of our customers operates a brand protection service for companies and content creators. Their promise to clients is simple to state and hard to deliver:

  1. Scan continuously: monitor 100,000+ websites, marketplaces, search engines, and social platforms around the clock for counterfeits, impersonations, and unauthorized sellers.
  2. Remove infringements: send legal notices to publishers, file marketplace IP complaints, de-index rogue pages from search engines, and take down fake social accounts.
  3. Document everything: give each client a dashboard with real-time evidence, enforcement status, and infringer trends.

Steps 2 and 3 are legal and product work. Step 1 is a data engineering problem, and it is where scraping infrastructure makes or breaks the business. Their platform runs recurring brand-keyword sweeps across marketplaces through Piloterr's APIs instead of maintaining an in-house fleet of headless browsers, proxies, and per-site parsers.

Why they outsource the scraping layer is worth spelling out, because it applies to any team building brand protection tooling:

  • Marketplaces are hostile targets. AliExpress search pages are JavaScript single-page applications behind anti-bot systems. Amazon rotates layouts and throttles aggressively. Maintaining bypass logic for a dozen sites is a full-time engineering team.
  • Coverage must be localized. Counterfeit sellers deliberately target markets where the brand is less vigilant. A sweep that only checks alibaba.com in English misses listings surfaced to French or Polish buyers.
  • Evidence must be structured. A takedown notice needs the seller identity, price, listing URL, and a timestamp: JSON fields, not screenshots of raw HTML.

Anatomy of a counterfeit detection pipeline

The pipeline has four stages, and each maps to specific API calls.

Plain text
Discover          Qualify           Document          Enforce & monitor
(search APIs)     (scoring)         (product APIs)    (takedown + re-scan)
     │                 │                  │                  │
brand keyword →  price/seller  →  seller identity,  →  IP complaint,
sweeps           heuristics       images, specs        re-listing watch

Stage 1: discover listings with search endpoints

Everything starts with brand-keyword sweeps. For each protected brand, the platform queries the search endpoint of every covered marketplace with the brand name, common misspellings ("nlke", "addidas"-style variants), and product-line keywords.

On AliExpress, one call returns structured listings with price, seller, and sales volume:

Bash
curl -G "https://api.piloterr.com/v2/aliexpress/search" \
  -H "x-api-key: YOUR-API-KEY" \
  --data-urlencode "query=acme headphones"

Each result includes product_id, title, listing_url, price, currency, and, when displayed, sold_count, seller_name, and seller_id. Pagination fields (total_results, total_pages, next) let you exhaust the result set: include ?page=N in a wholesale URL to paginate.

On Alibaba, the B2B side matters even more: this is where counterfeits are sourced upstream, in bulk, before they ever reach consumer marketplaces. The Alibaba Search API exposes MOQ and supplier identity directly on the search card, and supports 17 locale subdomains:

Bash
# English storefront
curl -G "https://api.piloterr.com/v2/alibaba/search" \
  -H "x-api-key: YOUR-API-KEY" \
  --data-urlencode "query=acme headphones"

# Same sweep on the French storefront: different sellers surface
curl -G "https://api.piloterr.com/v2/alibaba/search" \
  -H "x-api-key: YOUR-API-KEY" \
  --data-urlencode "query=acme headphones" \
  --data-urlencode "subdomain=french"

Running the same keyword across french, german, spanish, or polish subdomains regularly surfaces suppliers that never appear on the English storefront. For a brand protection sweep, each locale is a separate market to clear.

On Amazon, the Search API covers all major marketplaces via the domain parameter:

Bash
curl -G "https://api.piloterr.com/v2/amazon/search" \
  -H "x-api-key: YOUR-API-KEY" \
  --data-urlencode "query=acme headphones" \
  --data-urlencode "domain=de"

Results include the asin, title, price, real_price, rating, and reviews_count for both organic and sponsored listings. Sponsored placements matter: counterfeiters buy ads on the brand's own keywords.

The same pattern extends to eBay, Temu, Etsy, Allegro, Cdiscount, and the rest of the e-commerce collection. One integration, one authentication scheme (x-api-key), consistent JSON.

Stage 2: qualify suspects with scoring heuristics

A brand keyword sweep returns mostly legitimate listings. The qualification layer separates suspects from noise using the structured fields the search APIs return:

SignalField(s)Why it matters
Price far below MSRPprice, currencyA €300 product listed at €24 is the strongest single counterfeit indicator
Unknown sellerseller_name, seller_idNot in the brand's authorized-distributor list
High volume on a new listingsold_countFast-moving fakes cause the most damage
Bulk B2B availabilitymin_order, price_min (Alibaba)"500 pieces MOQ" of a trademarked product from an unknown factory
Brand in title, wrong brand fieldtitle vs brandKeyword-stuffing pattern typical of infringers

None of these signals alone proves infringement. Together, they produce a ranked queue where a human analyst (or increasingly, an image-matching model comparing image_url against the brand's official assets) confirms the case in seconds instead of hunting for it in hours.

Stage 3: document with product endpoints

Marketplace IP complaint programs (Alibaba's IPP, Amazon's Brand Registry, eBay's VeRO) require specific, verifiable evidence. This is what the product endpoints provide.

Once a listing is flagged, fetch its full detail page. On AliExpress, the Product API always returns seller identity, which search cards only expose sometimes:

Bash
curl -G "https://api.piloterr.com/v2/aliexpress/product" \
  -H "x-api-key: YOUR-API-KEY" \
  --data-urlencode "query=https://www.aliexpress.com/item/1005001234567890.html"

The response gives you the full evidence package: title, all product images, seller_id, seller_name, pricing, specifications, and delivery details, as structured JSON you can archive with a timestamp. The same applies to Alibaba Product (quantity tiers, supplier profile, lead times: the proof of bulk counterfeit manufacturing) and Amazon Product.

On Amazon, one more endpoint is decisive for brands that sell there themselves: Amazon Product Offer lists third-party sellers on a given ASIN. Counterfeiters frequently do not create new listings: they attach fake stock to the brand's own legitimate product page. Monitoring the offer list of your own ASINs catches exactly that.

Stage 4: enforce, then watch for re-listings

The takedown itself happens in the marketplace's IP program: outside the scraping layer. But enforcement without monitoring is a treadmill. Infringing sellers routinely:

  • re-list the same product under a new product_id a few days later,
  • clone the listing to a sister storefront (same seller_id, new listing),
  • move to another locale subdomain or another marketplace entirely.

This is why the pipeline is a loop, not a one-shot. The platform re-runs sweeps on a schedule, diffs results against the known-listings database, and matches new listings to previously enforced sellers by seller_id. A seller with three prior takedowns who reappears with a fourth listing goes straight to the top of the queue: and becomes documented evidence of repeat infringement, which most marketplace programs escalate to store closure.

A working Python sweep

The script below runs one brand keyword across three marketplaces and prints a ranked list of suspect listings, flagging anything priced below 40% of MSRP. It is deliberately minimal: in production you would persist snapshots, deduplicate against known listings, and feed a review queue.

Python
import requests

PILOTERR_API_KEY = "YOUR-API-KEY"
BRAND_KEYWORD = "acme headphones"
MSRP_EUR = 299.0
SUSPECT_THRESHOLD = 0.40  # flag listings under 40% of MSRP

BASE = "https://api.piloterr.com/v2"
HEADERS = {"x-api-key": PILOTERR_API_KEY}

def sweep_aliexpress(keyword: str) -> list[dict]:
    r = requests.get(f"{BASE}/aliexpress/search",
                     headers=HEADERS, params={"query": keyword}, timeout=60)
    r.raise_for_status()
    return [
        {
            "marketplace": "aliexpress",
            "title": item["title"],
            "url": item["listing_url"],
            "price": item.get("price"),
            "currency": item.get("currency"),
            "seller": item.get("seller_name"),
            "sold_count": item.get("sold_count"),
        }
        for item in r.json().get("results", [])
    ]

def sweep_alibaba(keyword: str, subdomain: str = "www") -> list[dict]:
    r = requests.get(f"{BASE}/alibaba/search", headers=HEADERS,
                     params={"query": keyword, "subdomain": subdomain}, timeout=60)
    r.raise_for_status()
    return [
        {
            "marketplace": f"alibaba/{subdomain}",
            "title": item["title"],
            "url": item["listing_url"],
            "price": item.get("price_min"),
            "currency": "USD",
            "seller": item.get("seller_name"),
            "min_order": item.get("min_order"),
        }
        for item in r.json().get("results", [])
    ]

def sweep_amazon(keyword: str, domain: str = "com") -> list[dict]:
    r = requests.get(f"{BASE}/amazon/search", headers=HEADERS,
                     params={"query": keyword, "domain": domain}, timeout=60)
    r.raise_for_status()
    return [
        {
            "marketplace": f"amazon.{domain}",
            "title": item["title"],
            "url": item["url"],
            "price": item.get("real_price") or item.get("price"),
            "currency": "EUR" if domain in ("fr", "de", "es", "it") else "USD",
            "asin": item["asin"],
        }
        for item in r.json()
    ]

def main():
    listings = (
        sweep_aliexpress(BRAND_KEYWORD)
        + sweep_alibaba(BRAND_KEYWORD)
        + sweep_alibaba(BRAND_KEYWORD, subdomain="french")
        + sweep_amazon(BRAND_KEYWORD, domain="de")
    )

    suspects = [
        item for item in listings
        if item["price"] is not None
        and item["price"] < MSRP_EUR * SUSPECT_THRESHOLD
    ]
    suspects.sort(key=lambda item: item["price"])

    print(f"{len(listings)} listings collected, {len(suspects)} suspects\n")
    for item in suspects:
        seller = item.get("seller") or "unknown seller"
        print(f"[{item['marketplace']}] {item['price']} {item['currency']} "
              f"| {seller}\n  {item['title'][:80]}\n  {item['url']}\n")

if __name__ == "__main__":
    main()

From here, each suspect's url goes to the corresponding product endpoint for the full evidence snapshot, and each confirmed case enters the enforcement queue.

Beyond marketplaces: rogue sites and impersonation

Marketplace listings are the largest surface, but brand abuse does not stop there. The same API-first approach covers the rest of the threat landscape:

Brand protection is one of the most defensible scraping use cases there is: you are collecting publicly displayed commercial offers to enforce intellectual property rights, and takedown programs run by the marketplaces themselves depend on rights holders finding infringements. The usual principles still apply: collect only public data, respect rate limits, and store no more personal data than the enforcement action requires. For the broader framework, see our guide on the legality of web scraping.

In summary

Brand protection at scale is a data pipeline: discover with marketplace search APIs, qualify with price and seller heuristics, document with product endpoints, enforce and re-scan in a loop. The platforms doing this well are not the ones with the biggest legal teams: they are the ones whose detection layer never sleeps.

Piloterr provides the detection layer as an API: AliExpress, Alibaba, Amazon, eBay, Temu, and the rest of the 500-endpoint library, with anti-bot bypass and browser rendering handled for you. If you are building brand protection tooling and want to evaluate the data quality on your own brands, create a free account (+500 credits, no credit card) or talk to us about volume pricing and endpoints we can add for your use case.

More to read

Guides and news about web scraping, proxies, and data extraction.

Scraping

Web scraping for automotive: tracking car prices and parts across AutoScout24, Mobile.de, Leboncoin, and Autodoc

How automotive pricing platforms use scraping APIs to monitor used-car listings on AutoScout24, Mobile.de, and Leboncoin, and parts prices across Autodoc's 30+ national shops. Pipeline design, API examples, and a Python script.

Josselin Liebe
Josselin Liebe
Read
Scraping

Migrating from NetNut: what to do after the network takedown

Google took action against the NetNut/Popa proxy network alongside the FBI and Lumen. How to rethink your scraping stack without managing proxies yourself.

Josselin Liebe
Josselin Liebe
Read
Scraping

€17.99 in France, €29.99 in Germany: monitoring prices by country

Same ERP reference, different prices by country: promos, currencies, and assortment vary from one shop to the next. Data model, API examples, and a Python script for reliable price monitoring.

Josselin Liebe
Josselin Liebe
Read

Ready to get started?

Your web scraping API is one click away. Start with +500 credits, no infrastructure to set up, no proxies to manage, and no credit card required.

  • +500 credits
  • No credit card required
  • All endpoints included