# Farfetch Scraper (`barking_kelp/farfetch-scraper`) Actor

Scrape Farfetch products from category, designer, sale and search pages on any storefront. Get title, brand, categories, prices in local currency, sizes, SKU, stock status and images per variant. Optional size & fit and recommended products. Fast HTTP-based, no browser.

- **URL**: https://apify.com/barking_kelp/farfetch-scraper.md
- **Developed by:** [9839_ser](https://apify.com/barking_kelp) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Farfetch Scraper

Scrapes [Farfetch](https://www.farfetch.com): **prices** (current and before discount), **brand**, **sizes**,
**colours**, **stock**, **images** and **every variant** of each product, plus the **category tree** with the
listing facets. Works with category, designer, sale, set, search and product URLs of **any Farfetch storefront**
(`/nl/`, `/uk/`, `/de/`, `/jp/`, …) in the locale and currency of the given URL — or just type a **search term**,
a **category** and/or a **brand** and no URL is needed. One dataset record per product or category.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `startUrls` | array | — | Farfetch URLs of any storefront (see below). Optional when `search`, `category` or `brand` is given. |
| `search` | string | — | Search term as typed into the site's search box (`gucci bag`). The search URL is built for you. |
| `category` | string | — | Every product of a category: name (`Mules`, `Sneakers`), `Parent > Name` when the name repeats (`Shoes > Boots`), URL slug (`mules-1`), listing URL or id. |
| `brand` | string | — | Brand / designer: name (`Gucci`), slug or id. With `category` → that brand in that category. |
| `department` | `women` | `men` | `kids` | `women` | Department for `search` / `category` / `brand`. |
| `storefront` | string | `nl` | Storefront country code for `search` / `category` / `brand` (`uk`, `de`, `us`, `jp`, …): country and currency of prices. |
| `sale` | boolean | `false` | `search` / `category` / `brand`: discounted products only. |
| `sortBy` | string | `ranking` | `search` / `category` / `brand` order: `ranking`, `newest`, `price_asc`, `price_desc`, `discount`. |
| `withCategoryProducts` | boolean | `false` | For storefront / department URLs: besides the category records, collect every product of the department (each product once). `false` → category records only, one request per category. |
| `withSizeFit` | boolean | `false` | Fill `variants[].extraInfo` with fit notes and measurements. |
| `withRecommends` | boolean | `false` | Fetch up to 12 recommended products per product (`recommendedProducts`). |
| `maxItems` | integer ≥ 0 | 100 when empty | Limit of saved records (products + categories). Every record is charged, so this is also a cost cap. `0` → unlimited. |
| `maxRequestsPerCrawl` | integer ≥ 0 | — | Legacy name of `maxItems` (tasks created before v2.1). Ignored when `maxItems` is set. |
| `maxConcurrency` | integer 1–100 | `5` | Parallel requests. Lower → smaller risk of blocks. |
| `proxy` | object | Apify Proxy (datacenter) | Proxy configuration. With a proxy country, URLs without a storefront prefix (`/shopping/...`) are served in that country's storefront and currency. |
| `browserImpersonation` | string | `safari_ios` | Advanced: browser profile used for requests. Keep the default. |

#### Supported `startUrls`

- **Storefront** — `https://www.farfetch.com/`, `https://www.farfetch.com/jp/` → every category of the storefront (women, men, kids).
- **Department** — `/shopping/women/`, `/shopping/men/`, `/shopping/kids/` → every category of the department.
- **Listing** with filters — `/shopping/women/mules-1/items.aspx?designer=1168&colour=1` (always from page 1).
- **Sale**, **designer**, **set** (`/sets/...aspx`) and **search** listings.
- **Product** — any product page (`...-item-<id>.aspx`).

Country and currency come from the storefront subfolder in the URL (`/uk/` → GB, GBP; `/de/` → DE, EUR, …). The
language is English, as the site serves it by default (`/de/` pages come in en-GB too); `?lang=de` etc. picks one of
the storefront's languages.

#### Search, category and brand without a URL

Fill `search`, `category` and/or `brand` (any combination) and the scraper builds the listing itself: it
collects all the products the site's own search or category page shows. Records get the equivalent
site URL as `crawlUrl`.

```json
{ "search": "gucci bag", "maxItems": 200 }
{ "category": "Sneakers", "brand": "Gucci", "department": "men", "sortBy": "newest" }
{ "category": "Boots", "sale": true, "storefront": "uk", "sortBy": "price_asc" }
```

Names are matched case-insensitively against the English category tree and the brand list of the department
(`Sneakers` and `Pants` also find the British `Trainers` and `Trousers`). A name that matches nothing stops with an
error that suggests close names; a category name that repeats picks the top-level one and says how to choose another.
The site has no sale-only search page, so with `search` + `sale` the records' `crawlUrl` is the plain search page.

#### Example

```json
{
  "startUrls": [
    { "url": "https://www.farfetch.com/nl/shopping/women/mules-1/items.aspx" },
    { "url": "https://www.farfetch.com/nl/shopping/women/jimmy-choo-cinch-small-bag-item-37439062.aspx" }
  ],
  "withCategoryProducts": false,
  "withSizeFit": true,
  "withRecommends": false,
  "maxItems": 500,
  "maxConcurrency": 5,
  "proxy": { "useApifyProxy": true }
}
```

> A whole storefront has more than 1 200 categories. With `maxItems: 0` and `withCategoryProducts: true`
> cap the spend with **Max total charge** in the run options.

### Output

Each record is either a **product** (has `source`) or a **category** (has `handle` and `productsCount`).
All prices are integers in **cents**: `115000` = `€1,150.00`.

#### Product record

```json
{
  "source": {
    "id": "37439062",
    "crawlUrl": "https://www.farfetch.com/nl/shopping/women/mules-1/items.aspx",
    "canonicalUrl": "https://www.farfetch.com/nl/shopping/women/jimmy-choo-cinch-small-bag-item-37439062.aspx",
    "retailer": "farfetch",
    "language": "en-GB",
    "currency": "EUR",
    "bundleIds": [],
    "createdUTC": null,
    "updatedUTC": 1792749806217,
    "publishedUTC": null
  },
  "title": "Cinch small bag",
  "description": "Defined by a soft silhouette, the Cinch bag features a faceted drawstring closure. …",
  "details": {
    "short_desc": "Cinch small bag",
    "full_desc": "Defined by a soft silhouette, …",
    "highlights": ["shiny croc-embossed leather", "drawstring closure", "antique gold-tone hardware"],
    "composition": [{ "name": "Calf Leather", "percentage": 100, "part": "Outer" }],
    "care": {},
    "farfetchID": "37439062",
    "brandStyleID": "J000187429",
    "madeIn": { "origin": "Made in Italy", "disclaimers": null }
  },
  "brand": "Jimmy Choo",
  "categories": ["Women", "Bags", "Shoulder Bags"],
  "tags": [],
  "medias": [
    { "type": "Image", "url": "https://cdn-images.farfetch-contents.com/37/43/90/62/37439062_77000852_1000.jpg?ov=true",
      "alt": "Jimmy Choo Cinch small bag", "index": 0, "width": 1000, "height": null, "variantIds": [] }
  ],
  "variants": [
    {
      "id": "37439062-1", "title": "OS", "sku": "J000187429", "options": ["brown", "1"], "label": null,
      "price": { "current": 103700, "currentFormatted": "1.037 €", "previous": null, "original": 0,
                 "stockStatus": "InStock", "stockCount": 7 },
      "medias": [], "extraInfo": { "fit": null, "measurements": null }
    }
  ],
  "options": [
    { "type": "Colour", "values": [{ "id": "brown", "name": "Brown", "icon": null }] },
    { "type": "Size", "values": [{ "id": "1", "name": "OS", "icon": null }] }
  ],
  "price": { "current": 103700, "currentFormatted": "1.037 €", "previous": null, "original": 0,
             "stockStatus": "InStock", "stockCount": 7 },
  "stats": { "rating": null, "reviewCount": null, "lovesCount": null },
  "extraInfo": { "label": null, "color": "1C1198 - SAMBUCOGOLD", "mainColor": "Brown", "condition": "New" },
  "subProducts": [],
  "recommendedProducts": []
}
```

| Field | Notes |
|---|---|
| `source.updatedUTC` | Farfetch's product version timestamp (ms). `createdUTC` / `publishedUTC` are not published → `null`. |
| `price.current` / `previous` / `original` | Cents. `previous` = price before the discount (`null` without discount), `original` = the same, `0` when the product is at full price. |
| `price.stockStatus` | `InStock` (> 5 pieces), `LowInStock` (1–5), `OutOfStock`. `stockCount` = pieces of the priced size across all sellers. |
| `variants[]` | One per size, in-stock sizes first. Each size is offered by one or more sellers; the cheapest available offer sets the price, `stockCount` sums all sellers. A size nobody offers gets the product price with `OutOfStock`. `extraInfo` is filled only with `withSizeFit` (`fit`: `[{type, description}]`, `measurements`: `[{type, name, imperial, metric}]`, `null` when Farfetch has none). |
| `options[]` | `Colour` (Farfetch products are single-colour) and `Size`. `variants[].options` = `[colourId, sizeId]`. |
| `medias[]` | Product images (1000 px wide); `height` is not published. |
| `stats` | Farfetch publishes no ratings → all `null`. |
| `recommendedProducts[]` | Only with `withRecommends`: `{id, url, raw}` where `raw` is the product in Farfetch's catalog-item format (price, productPrice, brand, images, sizes, tags, categories…). |

#### Category record

```json
{
  "id": "198938",
  "handle": "women/shoes/mules",
  "productsCount": 2127,
  "publishedUTC": null,
  "updatedUTC": null,
  "retailer": "farfetch",
  "url": "https://www.farfetch.com/nl/shopping/women/mules-1/items.aspx",
  "country": "NL",
  "language": "en-GB",
  "currency": "EUR",
  "department": "Women",
  "parentId": "136301",
  "paths": [["Women", "Shoes", "Mules"]],
  "description": "",
  "facets": [
    { "id": "brands", "name": "Brand", "type": "brands",
      "values": [{ "id": "1168", "name": "Gucci", "count": 87 }] },
    { "id": "attributes:11006", "name": "Heel Height", "type": "attributes",
      "values": [{ "id": "19500034", "name": "Flat" }] }
  ]
}
```

`handle` is built from the **English** category names from the department root, so it is identical on every
storefront; `paths` and `department` are in the storefront's language. `productsCount` counts all products of the
category including the ones on sale. `facets[]` are the listing filters: `categories`, `brands`, `colors`,
`sizes`, `price`, `discount`, `promotions`, `delivery`, `seasons`, `shippingLocations` and one `attributes:<id>`
facet per attribute group; `values[].count` is given for categories, brands and colours.

### Tips

- Use URLs with a storefront prefix (`https://www.farfetch.com/nl/...`, `/uk/...`): they are the fastest and most
  reliable. Sets (`/sets/...`), URLs without a prefix and listings with uncommon filters take a slower path that may
  need a **residential** proxy.
- The default Apify Proxy works for most runs; switch the proxy to **residential** if you see blocked requests in
  the log.
- Products are deduplicated within a run, and `maxItems` stops the run once that many records are saved.

### Limits

- Farfetch publishes no ratings, reviews or "loves" counts, no creation / publication dates and no image
  dimensions; the corresponding fields are `null`.
- Product descriptions on Farfetch are short; `description` falls back to the title when none exists.
- The China storefront (`farfetch.cn`) and logged-in features (wishlist, private sales) are not supported.
- The storefront language defaults to English (as on the site); add `?lang=de` etc. to a start URL for another one.

# Actor input Schema

## `startUrls` (type: `array`):

Storefront (`https://www.farfetch.com/`, `https://www.farfetch.com/jp/`) → all categories of the storefront. Department (`/shopping/women/`, `/shopping/men/`, `/shopping/kids/`) → all categories of the department. Listing with filters (`/shopping/women/mules-1/items.aspx?…`, always from page 1), sale, designer, set (`/sets/…aspx`) and search listings → their products. Product page → that product. Optional when Search term, Category or Brand is filled.

## `search` (type: `string`):

Words as typed into the site's search box, e.g. `gucci bag`. Combine with Category and/or Brand to narrow it down.

## `category` (type: `string`):

All products of a category of the department: its name (`Mules`, `Sneakers`), a name with its parent when the name repeats (`Shoes > Boots`), its URL slug (`mules-1`), a listing URL or the category id.

## `brand` (type: `string`):

A designer / brand: its name (`Gucci`, `Birkenstock`), URL slug (`designer-agostoni`) or id. With Category → that brand's products in that category.

## `department` (type: `string`):

Department searched and whose categories / brands the names are looked up in.

## `storefront` (type: `string`):

Storefront country code, as in the site's URLs (`nl`, `uk`, `de`, `us`, `jp`, …). Sets the country and currency of prices.

## `sale` (type: `boolean`):

Only discounted products (the site's Sale section).

## `sortBy` (type: `string`):

Order the products are collected in; matters together with Max records.

## `withCategoryProducts` (type: `boolean`):

For storefront and department URLs: besides the category records, collect every product of the department (each product once). `false` keeps it to category records only, one request per category.

## `withSizeFit` (type: `boolean`):

Fill `variants[].extraInfo` with fit notes and measurements. Slightly larger product requests.

## `withRecommends` (type: `boolean`):

Fetch up to 12 recommended products per product into `recommendedProducts` (one extra request per product).

## `maxItems` (type: `integer`):

Maximum number of saved records (products + categories). Every record is charged, so this is also a cost cap. Empty → 100; `0` → no limit.

## `maxRequestsPerCrawl` (type: `integer`):

Deprecated alias of `maxItems` kept for tasks created before v2.1. Ignored when `maxItems` is set.

## `maxConcurrency` (type: `integer`):

Parallel requests. Lower values reduce the risk of being blocked.

## `proxy` (type: `object`):

Proxy settings. The default Apify Proxy works for most runs; switch to RESIDENTIAL if you see blocked requests. With a proxy country, URLs without a storefront prefix (`https://www.farfetch.com/shopping/...`) are served in that country's storefront and currency.

## `browserImpersonation` (type: `string`):

Browser profile used for requests (`safari_ios`, `chrome`, `safari`, `firefox` or an exact one such as `safari17_2_ios`). Keep the default unless support asks you to change it; other profiles get blocked more often.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.farfetch.com/nl/shopping/women/mules-1/items.aspx"
    }
  ],
  "department": "women",
  "storefront": "nl",
  "sale": false,
  "sortBy": "ranking",
  "withCategoryProducts": false,
  "withSizeFit": false,
  "withRecommends": false,
  "maxItems": 100,
  "maxConcurrency": 5,
  "proxy": {
    "useApifyProxy": true
  },
  "browserImpersonation": "safari_ios"
}
```

# Actor output Schema

## `products` (type: `string`):

Product records: title, brand, categories, prices in cents, stock, images, all variants, options.

## `categories` (type: `string`):

Category records: id, handle, product count, path, parent, listing URL and facets.

## `allRecords` (type: `string`):

The whole default dataset, products and categories together.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

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

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.farfetch.com/nl/shopping/women/mules-1/items.aspx"
        }
    ],
    "maxItems": 100,
    "proxy": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("barking_kelp/farfetch-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

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://www.farfetch.com/nl/shopping/women/mules-1/items.aspx" }],
    "maxItems": 100,
    "proxy": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("barking_kelp/farfetch-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.farfetch.com/nl/shopping/women/mules-1/items.aspx"
    }
  ],
  "maxItems": 100,
  "proxy": {
    "useApifyProxy": true
  }
}' |
apify call barking_kelp/farfetch-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,barking_kelp/farfetch-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/AjkicUh44JYZVQxfK/builds/KuzivORmrh5ygp1BQ/openapi.json
