# JD Sports Product Scraper (`rl1987/jdsports-api-scraper`) Actor

Scrapes JD Sports product listings (search or category browse) with name, brand, SKU, price, availability, image and URL, from the JD Sports mobile MESH API. Covers 14 country stores.

- **URL**: https://apify.com/rl1987/jdsports-api-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 products

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## JD Sports Product Scraper

Scrape [JD Sports](https://www.jdsports.co.uk) product listings — by keyword **search** or
**category** browse — as structured dataset rows. The actor talks to JD Sports' mobile **MESH
API** directly (reversed from the `com.jd.jdsports` Android app), so results are the same data
the app shows: name, brand, SKU, price, discount, availability, colour, image and product URL.

No account or API key required — the per-store `x-api-key` and Hawk request-signing credentials
are recovered from the app and built into the client.

### Input

| Field | Type | Notes |
|-------|------|-------|
| `mode` | select | `search` (keyword) or `category` (browse a category slug). |
| `query` | string | Search keywords (search mode) or a category slug like `men`, `women/shoes` (category mode). |
| `store` | select | Country store: GB, IE, ES, FR, NL, DE, BE, IT, DK, SE, MY, AU, PT, AT, FI, SG, NZ, JX. |
| `sort` | select | `latest`, `name-a-z`, `name-z-a`, `price-low-high`, `price-high-low`, or default relevance. |
| `maxItems` | integer | Max products. `0` = all. |
| `proxyConfiguration` | proxy | Optional (the API answers from datacenter IPs); defaults to Apify Proxy. |

#### Example input

```json
{
  "mode": "search",
  "query": "nike air max",
  "store": "GB",
  "maxItems": 100,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

### Output

One row per product:

```json
{
  "name": "Nike Air Max 95 Junior",
  "brand": "Nike",
  "sku": "19738833",
  "price": "105.00",
  "currency": "GBP",
  "is_discounted": false,
  "availability": "IN STOCK",
  "colour": "Black",
  "url": "https://www.jdsports.co.uk/product/black-nike-air-max-95-junior/19738833/",
  "image": "https://..."
}
```

Every raw MESH field not mapped to a friendly key is preserved under a `raw_*` prefix, so nothing
is lost.

### Pricing

Pay-per-event: **$0.001 per product** returned.

### Notes & limitations

- Category slugs come from the store's own navigation tree (the app's `nav` endpoint). Use the
  slugs JD Sports itself uses, e.g. `men`, `women`, `women/shoes`.
- The `x-api-key` is enforced by the API; the Hawk signature is validated-when-present but not
  required — the client sends a correct one anyway for full app fidelity.
- This is an unofficial client and is not affiliated with or endorsed by JD Sports.

### Product details (PLP vs PDP)

By default the actor returns lightweight **listing (PLP)** rows. Set `includeDetails: true` to also fetch each product's **detail page (PDP)** — adding the full description, fabric, image gallery, review summary, and every size with per-size SKU, price and stock. The extra per-product call is billed as a separate `product-details` event ($0.001 each).

# Actor input Schema

## `mode` (type: `string`):

Scrape products by keyword search, browse a category by slug, or map the category tree to discover slugs. The categoryTree mode is FREE.

## `query` (type: `string`):

Search keywords (search mode) or a category slug like "men" or "men/mens-footwear" (category mode). For categoryTree mode this is optional — a root slug to crawl under; empty crawls men/women/kids.

## `store` (type: `string`):

JD Sports country store to query. The proxy exit is automatically matched to the store's country. Only markets on the JD Group mobile backend are listed (the US site runs on a separate platform and is not available).

## `sort` (type: `string`):

Result ordering. Leave as default for relevance.

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

Maximum products to return. 0 = all available.

## `proxyConfiguration` (type: `object`):

Route requests through a proxy. The MESH API works from datacenter IPs, so a proxy is optional; Apify Proxy is selected by default for stability.

## `includeDetails` (type: `boolean`):

For each product, fetch its product-detail page (one extra API call each) to add the full description, fabric, image gallery, review summary and all sizes with per-size price and stock. Billed separately.

## `maxDepth` (type: `integer`):

categoryTree mode only: how many levels deep to crawl.

## Actor input object example

```json
{
  "mode": "search",
  "query": "nike air max",
  "store": "GB",
  "sort": "",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "includeDetails": false,
  "maxDepth": 5
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "query": "nike air max",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/jdsports-api-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 = {
    "query": "nike air max",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/jdsports-api-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 '{
  "query": "nike air max",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call rl1987/jdsports-api-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rl1987/jdsports-api-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/A5bAhvKgTSgKehO7N/builds/NoGN7i9E3akous9qX/openapi.json
