Skip to content

piotrv1001/depop-scraper-nodejs-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to Scrape Depop Listings in Node.js

This example shows how to scrape Depop listings in Node.js using the Depop Listings Scraper actor on Apify. Instead of building a scraper from scratch, this project calls a ready-made Apify actor via the Apify API client — no browser automation or HTML parsing required.

Depop listings scraper results

What this example does

  • Calls the Depop Listings Scraper actor with a category URL and/or search query
  • Passes input configuration (category URLs, search queries)
  • Waits for the actor run to finish
  • Fetches results from the Apify dataset
  • Prints each scraped listing to the console

Prerequisites

Installation

npm install

Environment setup

Copy the example env file and add your Apify API token:

cp .env.example .env

Then open .env and replace your_apify_token_here with your actual token from the Apify console.

Usage

npm start

Code example

import { ApifyClient } from 'apify-client';
import 'dotenv/config';

// Initialize the ApifyClient with your Apify API token
// Set APIFY_TOKEN in your .env file (copy .env.example to get started)
const client = new ApifyClient({
    token: process.env.APIFY_TOKEN,
});

// Prepare Actor input
const input = {
    "categoryUrls": [
        {
            "url": "https://www.depop.com/category/mens/tops/tshirts/"
        }
    ],
    "searchQueries": [
        "vintage tshirt"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/depop-listings-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

Example output

See sample-output.json for a full example. Each listing includes:

  • url — direct link to the Depop product page
  • slug — URL-friendly product identifier
  • price — current listing price
  • originalPrice — original price if discounted (or null)
  • currency — currency code (e.g. USD)
  • size — item size label
  • brand — brand name
  • images — array of product image URLs
  • category — category path (e.g. mens/tops/tshirts)

Use cases

  • Resale market research — track pricing trends across categories or brands on Depop
  • Brand monitoring — find all listings for a specific brand and monitor how they're priced and sold
  • Vintage fashion analytics — aggregate secondhand inventory data for trend analysis
  • Price comparison — compare Depop prices against other resale platforms
  • Inventory sourcing — identify underpriced listings in specific categories for resale

Try the actor on Apify

Open the Depop Listings Scraper on Apify

Related resources

License

MIT

About

Example Node.js project showing how to scrape Depop listings using the Apify Depop Listings Scraper actor

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors