# Net A Porter Product Scraper (`harvester/net-a-porter-product-scraper`)

A Product Web scraper for the Net-A-Porter website. It only requires URLs of the targeted products. Then it returns all the variants of the products, including all important fields such as prices, designer name, colors, sizes, the first time the product became visible, and codes.

- **URL**: https://beta-securitybyobscurity.apify.com/harvester/net-a-porter-product-scraper.md
- **Developed by:** [Gilfoyle](https://beta-securitybyobscurity.apify.com/harvester) (community)
- **Categories:** E-commerce, Integrations, Developer tools
- **Stats:** 12 total users, 8 monthly users, 60.0% runs succeeded, NaN bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.00 / 1,000 products

This Actor is paid per result. You are not charged for the Apify platform usage, but only a fixed price for dataset items the Actor outputs.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

# README

### 🚀 [Net-A-Porter](https://www.net-a-porter.com) Product Web scraper

This scraper will take as an input a list of one product URL or more and return for you these fields as the table below shows

| Field             | Format  | Description                                                               |
|-------------------|---------|---------------------------------------------------------------------------|
| id                | text    | A Unique identifier for each product/variant.                             |
| sku               | text    | The SKU code for this product/variant.                                    |
| brand             | text    | The brand name of this product/variant.                                   |
| name              | text    | The product/variant name with its color/size/brand add to the name.       |
| price             | number  | The current price of this product/variant.                                |
| currency          | text    | The currency of the extracted price.                                      |
| Link              | link    | A direct link/URL to this product.                                        |
| Image             | image   | The main image of this product/variant.                                   |
| category          | array   | A list of the category breadcrumbs leading to this product/variant.       |
| buyable           | boolean | Whether this product/variant is available to buy from the website or not. |
| promotion\_message | text    | If this product have a promotion line showed, it will be here.            |
| discount\_price    | number  | If this product/variant have a discount, it will appear here.             |
| firstVisibleDate  | date    | The first time this product became visible on the website.                |

#### Output example

So this [product](https://www.net-a-porter.com/en-us/shop/product/lucy-delius/jewelry-and-watches/earrings/chubby-love-rhodium-plated-diamond-hoop-earrings/1647597332592537) will result in two variants like below:

```json
[
  {
    "identifier": "3074457345627511200",
    "sku": "1647597332592537",
    "brand": "LUCY DELIUS",
    "name": "LUCY DELIUS Chubby Love rhodium-plated diamond hoop earrings, Gold",
    "price": 8625,
    "currency": "USD",
    "url": "https://www.net-a-porter.com/en-us/shop/product/lucy-delius/jewelry-and-watches/earrings/chubby-love-rhodium-plated-diamond-hoop-earrings/1647597332592537",
    "image_url": "https://www.net-a-porter.com/variants/images/1647597332592537/in/w2000_q60.jpg",
    "category": [
      "Jewelry and Watches",
      "Fine Jewelry",
      "Earrings"
    ],
    "buyable": 1,
    "promotion_message": "",
    "discount_price": 0,
    "firstVisibleDate": "2024-09-13T16:00:12.000Z"
  },
  {
    "identifier": "3074457345628672678",
    "sku": "1647597351017932",
    "brand": "LUCY DELIUS",
    "name": "LUCY DELIUS Baby Chubby Love rhodium-plated 14-karat gold diamond hoop earrings, Gold",
    "price": 4980,
    "currency": "USD",
    "url": "https://www.net-a-porter.com/en-us/shop/product/lucy-delius/jewelry-and-watches/earrings/baby-chubby-love-rhodium-plated-14-karat-gold-diamond-hoop-earrings/1647597351017932",
    "image_url": "https://www.net-a-porter.com/variants/images/1647597351017932/in/w2000_q60.jpg",
    "category": [
      "Jewelry and Watches",
      "Fine Jewelry",
      "Earrings"
    ],
    "buyable": 1,
    "promotion_message": "",
    "discount_price": 0,
    "firstVisibleDate": "2024-09-13T16:00:12.000Z"
  }
]
```

In this spider all products will be extracted using a new external premium residential proxy for each request to maximize anonymity so you don't worry about anything.

My method has been used thousands of times to extract all products on this website for all regions without any issues or blocking. See for yourself and have fun!

#### Input parameters

We only require a list of one product or more which you want to extract

The input will be like this for one product

```json
{
   "urls": ["https://www.net-a-porter.com/en-us/shop/product/lucy-delius/jewelry-and-watches/earrings/chubby-love-rhodium-plated-diamond-hoop-earrings/1647597332592537"]
}
```

or more as you want

```json
{
   "urls": [
     "https://www.net-a-porter.com/en-us/shop/product/lucy-delius/jewelry-and-watches/earrings/chubby-love-rhodium-plated-diamond-hoop-earrings/1647597332592537",
     "https://www.net-a-porter.com/en-us/shop/product/carolina-bucci/jewelry-and-watches/bracelets/kiss-large-18-karat-rose-and-white-gold-bracelet/1647597354840746"
   ]
}
```

# Actor input Schema

## `urls` (type: `array`):

Array of products URLs you want to get its data from the website.

## Actor input object example

```json
{
  "urls": [
    "https://www.net-a-porter.com/en-us/shop/product/lucy-delius/jewelry-and-watches/earrings/chubby-love-rhodium-plated-diamond-hoop-earrings/1647597332592537"
  ]
}
```

# 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 = {
    "urls": [
        "https://www.net-a-porter.com/en-us/shop/product/lucy-delius/jewelry-and-watches/earrings/chubby-love-rhodium-plated-diamond-hoop-earrings/1647597332592537"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("harvester/net-a-porter-product-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 = { "urls": ["https://www.net-a-porter.com/en-us/shop/product/lucy-delius/jewelry-and-watches/earrings/chubby-love-rhodium-plated-diamond-hoop-earrings/1647597332592537"] }

# Run the Actor and wait for it to finish
run = client.actor("harvester/net-a-porter-product-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.net-a-porter.com/en-us/shop/product/lucy-delius/jewelry-and-watches/earrings/chubby-love-rhodium-plated-diamond-hoop-earrings/1647597332592537"
  ]
}' |
apify call harvester/net-a-porter-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=harvester/net-a-porter-product-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Net A Porter Product Scraper",
        "description": "A Product Web scraper for the Net-A-Porter website. It only requires URLs of the targeted products. Then it returns all the variants of the products, including all important fields such as prices, designer name, colors, sizes, the first time the product became visible, and codes.",
        "version": "0.0",
        "x-build-id": "PDh40siqpsqvwnLM1"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/harvester~net-a-porter-product-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-harvester-net-a-porter-product-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/harvester~net-a-porter-product-scraper/runs": {
            "post": {
                "operationId": "runs-sync-harvester-net-a-porter-product-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/harvester~net-a-porter-product-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-harvester-net-a-porter-product-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "Products URLs",
                        "type": "array",
                        "description": "Array of products URLs you want to get its data from the website.",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
