Actor picture

Farfetch Scraper

autofacts/farfetch

Farfetch web scraper to crawl product information including price and sale price, color, and images.

Free trial for 3 days

Then $30/month

No credit card required now

Author's avatarAutofactor
  • Modified
  • Users7
  • Runs114
Actor picture
Farfetch Scraper

Free trial for 3 days

Then $30/month

To run the code examples, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token. For a more detailed explanation, please read about running actors via the API in Apify Docs.

const { ApifyClient } = require('apify-client');

// Initialize the ApifyClient with API token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.farfetch.com/cz/shopping/women/mules-1/items.aspx?page=1&view=90&sort=3&scale=274&colour=13"
        }
    ],
    "proxy": {
        "useApifyProxy": true
    },
    "maxConcurrency": 5
};

(async () => {
    // Run the actor and wait for it to finish
    const run = await client.actor("autofacts/farfetch").call(input);

    // Fetch and print actor results from the run's dataset (if any)
    console.log('Results from dataset');
    const { items } = await client.dataset(run.defaultDatasetId).listItems();
    items.forEach((item) => {
        console.dir(item);
    });
})();