Daraz
7 days trial then $2.00/month - No credit card required now
Daraz
7 days trial then $2.00/month - No credit card required now
Scrape product listings from Daraz.pk with the custom query, optional proxy, and pagination for e-commerce insights.
Daraz.pk Scraper by Rigel Bytes
About the Scraper
The Daraz.pk Scraper allows you to extract product listings and detailed information from Daraz, the largest e-commerce platform in Pakistan. Whether you're performing price comparisons, competitor analysis, or market research, this scraper will efficiently collect data like product details, prices, seller information, and more.
Key Features
- Extracts product details including name, price, rating, reviews, and availability.
- Fetches seller information like seller name and location.
- Optionally input a proxy for private and controlled scraping.
- Scrape multiple pages of results by specifying the number of pages to extract.
- Supports both JSON and CSV output formats.
Use Cases
- Price Monitoring: Track price changes across products.
- Competitor Analysis: Gather insights about sellers, product availability, and ratings.
- Market Research: Analyze trends across different product categories.
Input Parameters
- query (required): The search query (e.g., "laptop", "phone", "shoes").
- pages (optional): The number of pages to scrape (default: 1).
- proxy (optional): Your own proxy to use during scraping (useful for large-scale scraping).
Recommended Proxy Providers
-
Shifter
- Reliable residential proxies all over the world.
- Cheap rates
- Order Shifter Now
- Get 10% Off any product, use coupan
rigelbytes-YoBB
.
-
OxyLabs
- 100M+ Proxies
- Fastest proxies in the market
- Real profile, human-like Residential IPs
- Quality assurance framework for most reliable IPs
- Get Proxies
🙌 Why Buy Through Our Affiliate Link?
- Exclusive Deals: Some providers may offer special discounts or bonuses when you use our link.
- Support Our Work: Each purchase helps us maintain and improve the tools and services we provide.
- No Extra Cost: You pay the same price, but part of it goes to supporting our efforts.
API Request Examples
Python
1from apify_client import ApifyClient 2 3# Initialize the ApifyClient with your API token 4client = ApifyClient("<YOUR_API_TOKEN>") 5 6# Prepare the Actor input 7run_input = { 8 "query": "mouthwash", 9 "pages": 3, 10 "proxy": "http://username:password@proxyaddress:port" 11} 12 13# Run the Actor and wait for it to finish 14run = client.actor("rigelbytes/daraz").call(run_input=run_input) 15 16# Fetch and print Actor results from the run's dataset (if there are any) 17for item in client.dataset(run["defaultDatasetId"]).iterate_items(): 18 print(item)
Node.js
1import { ApifyClient } from 'apify-client'; 2 3// Initialize the ApifyClient with API token 4const client = new ApifyClient({ 5 token: '<YOUR_API_TOKEN>', 6}); 7 8// Prepare Actor input 9const input = { 10 "query": "mouthwash", 11 "pages": 3, 12 "proxy": "http://username:password@proxyaddress:port" 13}; 14 15(async () => { 16 // Run the Actor and wait for it to finish 17 const run = await client.actor("rigelbytes/daraz").call(input); 18 19 // Fetch and print Actor results from the run's dataset (if any) 20 console.log('Results from dataset'); 21 const { items } = await client.dataset(run.defaultDatasetId).listItems(); 22 items.forEach((item) => { 23 console.dir(item); 24 }); 25})();
cURL
1# Set API token 2API_TOKEN=<YOUR_API_TOKEN> 3 4# Prepare Actor input 5cat > input.json <<'EOF' 6{ 7 "query": "mouthwash", 8 "pages": 3, 9 "proxy": "http://username:password@proxyaddress:port" 10} 11EOF 12 13# Run the Actor 14curl "https://api.apify.com/v2/acts/rigelbytes/daraz/runs?token=$API_TOKEN" \ 15 -X POST \ 16 -d @input.json \ 17 -H 'Content-Type: application/json'
Output
1{ 2 "name": { 3 "format": "string", 4 "label": "Name" 5 }, 6 "itemUrl": { 7 "format": "link", 8 "label": "URL" 9 }, 10 "image": { 11 "format": "image", 12 "label": "Primary Image" 13 }, 14 "price": { 15 "format": "string", 16 "label": "Price" 17 }, 18 "originalPriceShow": { 19 "format": "string", 20 "label": "Original Price Show" 21 }, 22 "priceShow": { 23 "format": "string", 24 "label": "Price (Unformatted)" 25 }, 26 "ratingScore": { 27 "format": "string", 28 "label": "Rating" 29 }, 30 "review": { 31 "format": "string", 32 "label": "Reviews" 33 }, 34 "nid": { 35 "format": "string", 36 "label": "Nid" 37 }, 38 "itemId": { 39 "format": "link", 40 "label": "Item ID" 41 }, 42 "isSmartImage": { 43 "format": "boolean", 44 "label": "Is Smart Image" 45 }, 46 "location": { 47 "format": "string", 48 "label": "Location" 49 }, 50 "sellerName": { 51 "format": "string", 52 "label": "Seller Name" 53 }, 54 "sellerId": { 55 "format": "string", 56 "label": "Seller ID" 57 }, 58 "brandName": { 59 "format": "string", 60 "label": "Brand Name" 61 }, 62 "brandId": { 63 "format": "string", 64 "label": "Brand ID" 65 }, 66 "cheapest_sku": { 67 "format": "string", 68 "label": "Cheapest SKU" 69 }, 70 "skuId": { 71 "format": "string", 72 "label": "SKU ID" 73 }, 74 "sku": { 75 "format": "string", 76 "label": "SKU" 77 }, 78 "showFeedBack": { 79 "format": "boolean", 80 "label": "Show Feedback" 81 }, 82 "inStock": { 83 "format": "boolean", 84 "label": "In Stock" 85 }, 86 "itemSoldCntShow": { 87 "format": "string", 88 "label": "Items Sold" 89 }, 90 "longImageDisplayable": { 91 "format": "boolean", 92 "label": "Long Image Displayable" 93 }, 94 "promotionId": { 95 "format": "boolean", 96 "label": "Promotion ID" 97 }, 98 "isSponsored": { 99 "format": "boolean", 100 "label": "Is Sponsored" 101 }, 102 "tItemType": { 103 "format": "string", 104 "label": "Item Type" 105 }, 106 "skuType": { 107 "format": "string", 108 "label": "SKU Type" 109 }, 110 "adFlag": { 111 "format": "string", 112 "label": "Ad Flag" 113 }, 114 "directSimilarUrl": { 115 "format": "string", 116 "label": "Direct Similar URL" 117 }, 118 "gridTitleLine": { 119 "format": "string", 120 "label": "Grid Title Line" 121 }, 122 "isFission": { 123 "format": "string", 124 "label": "Is Fission" 125 }, 126 "isBadgeAutoScroll": { 127 "format": "boolean", 128 "label": "Is Badge Auto Scroll" 129 }, 130 "showCart": { 131 "format": "boolean", 132 "label": "Show Cart" 133 } 134}
Requirements
- An Apify account
- Search Query.
Understanding Proxies:
When scraping data or browsing anonymously, proxies are essential. They act as intermediaries, masking your original IP address and allowing you to send requests from another location.
Why Use Proxies?
- Avoid IP Blocks: By routing requests through proxies, you prevent the target website from recognizing your IP as a scraper or spammer.
- Access Geo-restricted Content: Proxies let you access content or websites restricted by location.
- Enhance Anonymity: Hide your actual IP, ensuring privacy while scraping or browsing.
Types of Proxies
- Residential Proxies
- Real IP addresses provided by ISPs to home users.
- They mimic regular users, making them harder to detect.
- Best for: Long-term, undetectable scraping, and avoiding blocks.
- Data Center Proxies
- IP addresses from servers in data centers.
- Faster and cheaper than residential proxies but easier to detect and block.
- Best for: High-speed scraping, but with a higher risk of detection.
- Mobile Proxies
- IPs provided by mobile carriers (3G/4G/5G networks).
- Very difficult to detect, as they appear as regular mobile users.
- Best for: Mobile-related scraping or avoiding sophisticated blocks.
Rotating Proxies vs. Straight Proxies
- Rotating Proxies: Every request you send goes through a different proxy, making it harder for websites to detect patterns.
- Straight Proxies: All requests are sent through the same proxy, making it easier to track your IP.
About Rigel Bytes
Rigel Bytes specializes in web scraping, automation, and data analytics. We help businesses extract and leverage valuable data for informed decision-making.
Contact Us
Ready to unlock the power of data? Reach out to us at (contact@rigelbytes.com) or book an appointment with us to learn more about how we can help you achieve your data goals.
- 4 monthly users
- 1 star
- 100.0% runs succeeded
- Created in Oct 2024
- Modified 17 days ago