DEV Community

Donny Nguyen
Donny Nguyen

Posted on • Originally published at rapidapi.com

How to Scrape Shopee Product Data Without Getting Blocked

Shopee is one of Southeast Asia's largest e-commerce platforms — over 300 million active users across Singapore, Malaysia, Indonesia, Thailand, Vietnam, Philippines, and Taiwan. If you're doing price monitoring, competitor research, or market analysis in that region, you need Shopee data.

The problem: Shopee blocks scrapers hard.

Their anti-bot stack includes Cloudflare, device fingerprinting, JavaScript challenges, and rate limiting that triggers on even modest request volumes. Building a reliable Shopee scraper yourself means rotating proxies, solving CAPTCHAs, and maintaining the code every time Shopee updates their frontend — which they do constantly.

I've solved this and packaged it as a hosted API. Here's how to use it.

API Link: Shopee Product Scraper API on RapidAPI

What You Get

Send a search keyword. Get back a clean array of Shopee product listings:

{
  "success": true,
  "query": "wireless earbuds",
  "count": 20,
  "data": [
    {
      "productId": "12345678",
      "name": "TWS Wireless Earbuds Bluetooth 5.3",
      "price": 12.99,
      "currency": "USD",
      "originalPrice": 24.99,
      "discountPercent": 48,
      "rating": 4.8,
      "reviewCount": 2341,
      "sold": 15420,
      "location": "Singapore",
      "shopName": "TechDeals SG",
      "productUrl": "https://shopee.sg/...",
      "imageUrl": "https://cf.shopee.sg/..."
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Quick Start

JavaScript

const axios = require('axios');

async function searchShopee(keyword, options = {}) {
  const response = await axios.get(
    'https://shopee-product-scraper1.p.rapidapi.com/search',
    {
      params: {
        q: keyword,
        limit: options.limit || 20,
        region: options.region || 'sg', // sg, my, id, th, vn, ph, tw
        sortBy: options.sortBy || 'relevancy' // relevancy, sales, price_asc, price_desc, rating
      },
      headers: {
        'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
        'X-RapidAPI-Host': 'shopee-product-scraper1.p.rapidapi.com'
      }
    }
  );
  return response.data;
}

const results = await searchShopee('wireless earbuds', { region: 'sg', sortBy: 'sales' });
Enter fullscreen mode Exit fullscreen mode

Python

import requests

def search_shopee(keyword, region='sg', sort_by='relevancy', limit=20):
    response = requests.get(
        'https://shopee-product-scraper1.p.rapidapi.com/search',
        params={
            'q': keyword,
            'region': region,
            'sortBy': sort_by,
            'limit': limit
        },
        headers={
            'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
            'X-RapidAPI-Host': 'shopee-product-scraper1.p.rapidapi.com'
        }
    )
    return response.json()
Enter fullscreen mode Exit fullscreen mode

Use Cases

1. Price Monitoring

Track competitor pricing over time:

async function monitorPrice(keyword, targetProductName) {
  const results = await searchShopee(keyword);
  const product = results.data.find(p => 
    p.name.toLowerCase().includes(targetProductName.toLowerCase())
  );

  return {
    product: product?.name,
    currentPrice: product?.price,
    timestamp: new Date().toISOString()
  };
}

// Run this on a cron to track price history
Enter fullscreen mode Exit fullscreen mode

2. Market Research — Find Best-Selling Products

async function findTopSellers(category, region = 'sg') {
  const results = await searchShopee(category, { 
    region, 
    sortBy: 'sales',
    limit: 50 
  });

  return results.data
    .filter(p => p.rating >= 4.5)
    .sort((a, b) => b.sold - a.sold)
    .slice(0, 10)
    .map(p => ({
      name: p.name,
      price: p.price,
      sold: p.sold,
      rating: p.rating,
      url: p.productUrl
    }));
}
Enter fullscreen mode Exit fullscreen mode

3. Dropshipping Product Research

Find high-margin, high-demand products:

async function findDropshippingOpportunities(keywords) {
  const allResults = await Promise.all(
    keywords.map(kw => searchShopee(kw, { sortBy: 'sales' }))
  );

  const products = allResults.flatMap(r => r.data);

  // Filter for high sales + high discount (margin opportunity)
  return products
    .filter(p => p.sold > 1000 && p.discountPercent >= 30)
    .sort((a, b) => b.sold - a.sold);
}
Enter fullscreen mode Exit fullscreen mode

4. Multi-Region Price Comparison

Compare the same product across Shopee's regional platforms:

async function compareRegionalPrices(productKeyword) {
  const regions = ['sg', 'my', 'id', 'th', 'ph'];

  const results = await Promise.all(
    regions.map(region => searchShopee(productKeyword, { region, limit: 5 }))
  );

  return regions.map((region, i) => ({
    region,
    averagePrice: results[i].data.reduce((sum, p) => sum + p.price, 0) / results[i].count,
    cheapest: Math.min(...results[i].data.map(p => p.price)),
    mostExpensive: Math.max(...results[i].data.map(p => p.price))
  }));
}
Enter fullscreen mode Exit fullscreen mode

5. Review Analysis

Pull products with high review counts for sentiment analysis:

async function getHighReviewProducts(keyword) {
  const results = await searchShopee(keyword, { sortBy: 'rating', limit: 50 });

  return results.data
    .filter(p => p.reviewCount >= 500 && p.rating >= 4.7)
    .map(p => ({
      name: p.name,
      rating: p.rating,
      reviews: p.reviewCount,
      url: p.productUrl
    }));
}
Enter fullscreen mode Exit fullscreen mode

Parameters

Parameter Type Required Description
q string Yes Search keyword
region string No sg, my, id, th, vn, ph, tw (default: sg)
sortBy string No relevancy, sales, price_asc, price_desc, rating
limit number No Results to return (1-50, default: 20)

Pricing

Plan Requests/mo Price
BASIC 500 Free
PRO 10,000 $9.99/mo
ULTRA 50,000 $29.99/mo
MEGA 200,000 $79.99/mo

Why Not Scrape Directly?

Shopee's anti-bot measures include:

  • Cloudflare Enterprise — blocks headless browsers
  • Device fingerprinting — detects automation tools
  • Rate limiting — triggers after 10-20 requests
  • CAPTCHA challenges — on suspicious traffic
  • IP bans — for repeated attempts

Getting around this reliably requires residential proxies ($50-200/mo), CAPTCHA solving services ($10-30/mo), and ongoing maintenance. The hosted API handles all of this — you just call the endpoint.

Get Started

Subscribe to Shopee Product Scraper API on RapidAPI →


Built by Donny Dev — also check out Apollo Lead Scraper API, Website Tech Detector API, and Email Extractor API.

Top comments (0)