Skip to content

About

Mango Scraper API by Piloterr: product, search data from Mango as structured JSON. Python, TypeScript, cURL, PHP, C#, Go, Java, Ruby examples.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mango Scraper API by Piloterr – scrape Mango data as JSON

Mango Scraper API

Discord Get API key API docs License: MIT

The Piloterr Mango Scraper API lets you extract public data from Mango as clean, structured JSON — no proxies, headless browsers or HTML parsing to maintain. Endpoints available in production:

  • Mango Product API — Fetch a Mango product by URL, including the selling price and sizes in stock.
  • Mango Search API — Search Mango by keyword and return product cards with the current selling price.

Use it for price monitoring, assortment tracking, competitor analysis, product research or catalog enrichment.

Endpoint Path Credits What you get
Mango Product API /v2/mango/product 1 Fetch a Mango product by URL, including the selling price and sizes in stock.
Mango Search API /v2/mango/search 1 Search Mango by keyword and return product cards with the current selling price.

Table of contents

How it works

  1. Create a free Piloterr account and copy your API key from the dashboard.
  2. Send a GET (or POST) request to https://api.piloterr.com/v2/... with the header x-api-key: YOUR_API_KEY.
  3. Receive structured JSON — Piloterr handles rendering, proxies, retries and parsing.
export PILOTERR_API_KEY="your-api-key"
pip install requests        # Python
# TypeScript: Node.js 18+ (native fetch), run with `npx tsx file.ts`

Every endpoint accepts both GET (query string) and POST (JSON body with the same fields).

Mango Product API

Fetch a Mango product by URL, including the selling price and sizes in stock.

GET | POST https://api.piloterr.com/v2/mango/product · 1 credit per request · Full reference

Request parameters

Parameter Type Required Description
query string ✅ A shop.mango.com product URL. The colour segment in the path selects the colour.
country string — Unused when query is a full product URL. The URL path carries the region.
return_page_source boolean — Return the page HTML instead of the parsed product.

Python example

import json
import os
import requests

response = requests.get(
    "https://api.piloterr.com/v2/mango/product",
    headers={"x-api-key": os.environ["PILOTERR_API_KEY"]},
    params={
        "query": "https://shop.mango.com/fr/fr/p/femme/robes-et-combinaisons/courte/robe-courte-maille/37097796/92/00",
    },
    timeout=120,
)
response.raise_for_status()
data = response.json()

print(json.dumps(data, indent=2, ensure_ascii=False)[:2000])

TypeScript example

type MangoProduct = {
  url?: string;
  brand?: string;
  image?: string;
  price?: number;
  sizes?: {
    size?: string;
    is_in_stock?: boolean;
    is_low_in_stock?: boolean;
  }[];
  title?: string;
  colors?: {
    url?: string;
    colour?: string;
    colour_id?: string;
  }[];
  colour?: string;
  images?: string[];
  country?: string;
  currency?: string;
  colour_id?: string;
  product_id?: number;
  composition?: string;
  description?: string;
  price_display?: string;
  compare_at_price?: number;
};

const params = new URLSearchParams({
  "query": "https://shop.mango.com/fr/fr/p/femme/robes-et-combinaisons/courte/robe-courte-maille/37097796/92/00",
});

const response = await fetch(`https://api.piloterr.com/v2/mango/product?${params}`, {
  headers: { "x-api-key": process.env.PILOTERR_API_KEY! },
});
if (!response.ok) throw new Error(`Piloterr error ${response.status}: ${await response.text()}`);

const data = (await response.json()) as MangoProduct;

console.log(JSON.stringify(data, null, 2).slice(0, 2000));
POST variant
POST https://api.piloterr.com/v2/mango/product
x-api-key: YOUR_API_KEY
Content-Type: application/json

{"query": "https://shop.mango.com/fr/fr/p/femme/robes-et-combinaisons/courte/robe-courte-maille/37097796/92/00"}

Output example

Example response from the API reference, abridged — real values depend on the page you scrape.

{
  "url": "https://shop.mango.com/fr/fr/p/femme/robes-et-combinaisons/courte/robe-courte-maille/37097796/92/00",
  "brand": "Mango",
  "image": "https://media.mango.com/is/image/punto/37097796-92-002",
  "price": 29.99,
  "sizes": [
    {
      "size": "XXS",
      "is_in_stock": false,
      "is_low_in_stock": false
    },
    {
      "size": "XS",
      "is_in_stock": true,
      "is_low_in_stock": false
    }
  ],
  "title": "Robe courte maille",
  "colors": [
    {
      "url": "https://shop.mango.com/fr/fr/p/femme/robes-et-combinaisons/courte/robe-courte-maille/37097796/56/00",
      "colour": "Bleu marine",
      "colour_id": "56"
    },
    {
      "url": "https://shop.mango.com/fr/fr/p/femme/robes-et-combinaisons/courte/robe-courte-maille/37097796/92/00",
      "colour": "Gris",
      "colour_id": "92"
    }
  ],
  "colour": "Gris",
  "images": [
    "https://media.mango.com/is/image/punto/37097796-92-002",
    "https://media.mango.com/is/image/punto/37097796-92-001"
  ],
  "country": "fr",
  "currency": "EUR",
  "colour_id": "92",
  "product_id": 37097796,
  "composition": "Composition: 31% polyester, 63% acrylique, 4% laine, 2% elasthanne",
  "description": "Tissu en grosse maille. Finitions côtelées. Silhouette droite. Coupe courte. Col montant avec fermeture à boutons. Manches longues",
  "price_display": "29,99 €",
  "compare_at_price": 39.99
}

Response fields

Field Type Description
url string
brand string
image string
price number
sizes[] object[]
sizes[].size string
sizes[].is_in_stock boolean
sizes[].is_low_in_stock boolean
title string
colors[] object[]
colors[].url string
colors[].colour string
colors[].colour_id string
colour string
images string[]
country string
currency string
colour_id string
product_id integer
composition string
description string
price_display string
compare_at_price number

Mango Search API

Search Mango by keyword and return product cards with the current selling price.

GET | POST https://api.piloterr.com/v2/mango/search · 1 credit per request · Full reference

Request parameters

Parameter Type Required Description
query string ✅ Keyword or a shop.mango.com search URL.
country string — Store for a keyword. fr (default) is /fr/fr/search/femme. us is /us/en/search/women. gb and uk are /gb/en/search/women. A full URL keeps its own path.
return_page_source boolean — Return the page HTML instead of the parsed search.

Python example

import json
import os
import requests

response = requests.get(
    "https://api.piloterr.com/v2/mango/search",
    headers={"x-api-key": os.environ["PILOTERR_API_KEY"]},
    params={
        "query": "robe",
    },
    timeout=120,
)
response.raise_for_status()
data = response.json()

print(json.dumps(data, indent=2, ensure_ascii=False)[:2000])

TypeScript example

type MangoSearch = {
  results?: {
    url?: string;
    image?: string;
    price?: number;
    title?: string;
    colour?: string;
    currency?: string;
    colour_id?: string;
    product_id?: number;
    price_display?: string;
    compare_at_price?: number;
  }[];
  pagination?: {
    next?: unknown;
    page?: number;
    per_page?: number;
    total_pages?: unknown;
    total_results?: number;
  };
};

const params = new URLSearchParams({
  "query": "robe",
});

const response = await fetch(`https://api.piloterr.com/v2/mango/search?${params}`, {
  headers: { "x-api-key": process.env.PILOTERR_API_KEY! },
});
if (!response.ok) throw new Error(`Piloterr error ${response.status}: ${await response.text()}`);

const data = (await response.json()) as MangoSearch;

console.log(JSON.stringify(data, null, 2).slice(0, 2000));
POST variant
POST https://api.piloterr.com/v2/mango/search
x-api-key: YOUR_API_KEY
Content-Type: application/json

{"query": "robe"}

Output example

Example response from the API reference, abridged — real values depend on the page you scrape.

{
  "results": [
    {
      "url": "https://shop.mango.com/fr/fr/p/femme/robes-et-combinaisons/courte/robe-courte-maille/37097796/92/00",
      "image": "https://media.mango.com/is/image/punto/37097796-92-001",
      "price": 29.99,
      "title": "Robe courte maille",
      "colour": "Gris",
      "currency": "EUR",
      "colour_id": "92",
      "product_id": 37097796,
      "price_display": "29,99 €",
      "compare_at_price": 39.99
    }
  ],
  "pagination": {
    "next": null,
    "page": 1,
    "per_page": 8,
    "total_pages": null,
    "total_results": 535
  }
}

Response fields

Field Type Description
results[] object[]
results[].url string
results[].image string
results[].price number
results[].title string
results[].colour string
results[].currency string
results[].colour_id string
results[].product_id integer
results[].price_display string
results[].compare_at_price number
pagination object
pagination.next object
pagination.page integer
pagination.per_page integer
pagination.total_pages object
pagination.total_results integer

Code examples in other languages

Ready-to-run examples live in the examples/ folder. Each one reads your key from the PILOTERR_API_KEY environment variable.

Language Product Search
cURL (Bash) product search
PHP product search
C# product search
Go product search
Java product search
Ruby product search
Node.js product search

Practical use cases

  • Price monitoring — Track prices, promotions and availability over time to react to competitors.
  • Assortment & catalog tracking — Follow new products, delisted items and category changes.
  • Competitor analysis — Benchmark ranges, brands and positioning across retailers.
  • Product research — Spot best-sellers and trends from search results.
  • Catalog enrichment — Pull titles, images and attributes into your PIM or marketplace listings.

Why Piloterr?

  • No infrastructure — no proxies, headless browsers or CAPTCHA solving to run yourself.
  • Structured JSON — stable, documented fields instead of brittle HTML selectors.
  • Pay per request — transparent credit cost per endpoint, failed requests are retried for you.
  • One API key, hundreds of sources — Mango plus many other e-commerce, search and company data endpoints in the Piloterr library.
  • Any language — plain HTTPS + JSON, with examples for Python, TypeScript, cURL, PHP, C#, Go, Java, Ruby and Node.js.

FAQ

Is it legal to scrape Mango?

Collecting publicly available data is generally allowed in many jurisdictions, but rules depend on your country, the data you collect and how you use it. Avoid personal data unless you have a lawful basis, respect the website's terms where they apply, and get legal advice for your specific use case. This is not legal advice.

Do I need proxies or a headless browser?

No. Piloterr handles rendering, proxy rotation and retries on its side. You only send an HTTPS request with your x-api-key header and receive JSON.

How much does a request cost?

Credits per call: /v2/mango/product 1, /v2/mango/search 1. See the Piloterr website for plans.

What data does the Mango API return?

Each endpoint returns structured JSON: Mango Product — url, brand, image, price, sizes[], sizes[].size; Mango Search — results[], results[].url, results[].image, results[].price, results[].title, results[].colour.

Can I target a specific country or language?

Yes, use country — see the parameter tables above for accepted values.

Can I get the raw HTML instead of JSON?

Yes. Set return_page_source=true and the response becomes {"result": "..."} with the page source.

Which languages are supported?

Any language that can make an HTTP request. This README shows Python and TypeScript; the examples/ folder contains cURL, PHP, C#, Go, Java, Ruby and Node.js.

Official SDKs

Use Piloterr from your own language with a typed client:

SDK Package Install
Node.js @piloterr/sdk npm install @piloterr/sdk
Python piloterr pip install piloterr
Go piloterr-go go get github.com/piloterr/piloterr-go
.NET Piloterr dotnet add package Piloterr
Ruby piloterr gem install piloterr
PHP piloterr/sdk composer require piloterr/sdk
Java piloterr-java build from source, see its README
CLI @piloterr/cli npm install -g @piloterr/cli
MCP server @piloterr/mcp npx -y @piloterr/mcp

Related scrapers

Support


Piloterr
Built by Piloterr — web scraping APIs for e-commerce, search, real estate and more, one API key.

Mango is a trademark of its respective owner. This repository is not affiliated with or endorsed by Mango. Examples are released under the MIT license.

About

Mango Scraper API by Piloterr: product, search data from Mango as structured JSON. Python, TypeScript, cURL, PHP, C#, Go, Java, Ruby examples.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors