# Ninja 🥷🏽 نينجا Product Scraper (`boring_internet_explorer/ninja-product-scraper`) Actor

Extract product data from ananinja.com — prices, stock availability, brands, images, product IDs, and category for groceries, pharmacy, beauty, and household products across Saudi Arabia, Bahrain, Qatar, and Kuwait. Ideal for price monitoring, catalog synchronization, and market research.

- **URL**: https://apify.com/boring\_internet\_explorer/ninja-product-scraper.md
- **Developed by:** [Boring Internet Explorer](https://apify.com/boring_internet_explorer) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 products

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Ninja 🥷🏽 نينجا (ananinja.com) Product Scraper

Scrapes product data from **Ninja** (`ananinja.com`), the 24/7 online marketplace for groceries, pharmacy, and beauty products. Given a category page, the scraper collects the products listed on it and returns structured data for each one — including price, brand, images, and the full category breadcrumb.

Ninja operates across four markets, and this scraper supports all of them:

- 🇸🇦 Saudi Arabia (`sa`)
- 🇧🇭 Bahrain (`bh`)
- 🇶🇦 Qatar (`qa`)
- 🇰🇼 Kuwait (`kw`)

### Why use this scraper?

Ninja is one of the leading quick-commerce platforms in the Gulf region, offering thousands of products across groceries, pharmacies, beauty, and household categories. However, product catalogs, prices, and availability can vary significantly between countries and change frequently over time.

This scraper makes it easy to collect structured product data from Ninja's different markets, enabling use cases such as:

- 📊 Market research and competitive analysis across Saudi Arabia, Bahrain, Qatar, and Kuwait.
- 💰 Tracking product prices and availability over time.
- 🛒 Building product catalogs, comparison tools, and shopping applications.
- 📈 Monitoring inventory trends and category performance.
- 🤖 Powering analytics pipelines, recommendation systems, and AI applications.
- 🌍 Comparing the same products across multiple countries and currencies.

By returning normalized product information—including pricing, images, brands, and category breadcrumbs—the scraper eliminates the need to manually collect and organize data from Ninja's storefront.

### Input

The scraper takes a **start URL** (a category page) and a **max items** limit.

| Field                | Type   | Description                                                          |
| -------------------- | ------ | -------------------------------------------------------------------- |
| `startUrls`          | string | A Ninja category page URL or detail page URL to scrape details from. |
| `maxItems`           | number | Maximum number of products to scrape from the category.              |
| `proxyConfiguration` | object | Optional proxy settings                                              |

#### Example input

```json
{
  "maxItems": 5,
  "startUrls": "https://ananinja.com/sa/ar/category/fruits-vegetables#fruits-vegetables-summer-fruits-fruits-vegetables",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
````

### Output

Each scraped product is stored as one record in the dataset. Prices are returned in the market's own currency (SAR, BHD, QAR, or KWD), and the `category` array reflects the product's breadcrumb trail from broadest to most specific.

#### Example output

```json
{
  "scrapedAt": "2026-07-13T15:06:21.572Z",
  "url": "https://ananinja.com/bh/ar/product/energizer-cr1616-coin-battery-1-piece-19314990",
  "productId": "19314990",
  "name": "إنرجايزر CR1616 بطارية عملة قطعة واحدة",
  "description": null,
  "brand": "ENERGIZER",
  "country": "bh",
  "language": "ar",
  "price": {
    "value": 0.99,
    "currency": "BHD",
    "inStock": true
  },
  "image": [
    "https://img.ananinja.com/media/ninja-catalog-42/bahrain_item_pics/B45/8888021301717.jpg"
  ],
  "category": [
    {
      "index": 0,
      "name": "مستلزمات المنزل",
      "url": "https://ananinja.com/bh/ar/category/bh_household"
    },
    {
      "index": 1,
      "name": "بطاريات",
      "url": "https://ananinja.com/bh/ar/category/bh_household#bh_bateries"
    }
  ]
}
```

#### Field reference

| Field              | Type              | Description                                                           |
| ------------------ | ----------------- | --------------------------------------------------------------------- |
| `scrapedAt`        | string (ISO 8601) | Timestamp of when the product was scraped.                            |
| `url`              | string            | Canonical product page URL.                                           |
| `productId`        | string            | Ninja's internal product identifier (the trailing number in the URL). |
| `name`             | string            | Product name (in the requested language).                             |
| `description`      | string | null    | Product description, or `null` when the store provides none.          |
| `brand`            | string            | Brand name.                                                           |
| `country`          | string            | Market code: `sa`, `bh`, `qa`, or `kw`.                               |
| `language`         | string            | Language code from the URL (e.g. `ar`).                               |
| `price.value`      | number            | Price in the market's currency.                                       |
| `price.currency`   | string            | Currency code (`SAR`, `BHD`, `QAR`, `KWD`).                           |
| `price.inStock`    | boolean           | Whether the product is currently available.                           |
| `image`            | string\[]          | Product image URLs.                                                   |
| `category`         | object\[]          | Breadcrumb categories, ordered broad → specific.                      |
| `category[].index` | number            | Position in the breadcrumb (0 = top-level category).                  |
| `category[].name`  | string            | Category display name.                                                |
| `category[].url`   | string            | Absolute URL to the category page.                                    |

### ❓ FAQ

**Can I scrape Ninja products from different countries?**\
Yes — the scraper supports all four Ninja markets: Saudi Arabia, Bahrain, Qatar, and Kuwait. Simply provide a category URL from the market you want to scrape, and the scraper will automatically detect the country, language, and currency.

**Can I compare grocery and household prices across Gulf markets?**\
Yes — because prices are returned in each market's native currency (SAR, BHD, QAR, or KWD), the scraper can be used to monitor and compare product catalogs and pricing across different countries.

**What product data can I extract from Ninja?**\
You can extract product names, prices, stock availability, brands, product images, category breadcrumbs, product IDs, descriptions, and product URLs.

**Can I use this as a Ninja price tracker?**\
Yes — by scheduling runs on Apify, you can monitor price changes, stock availability, and product catalog updates over time.

**Can I scrape a specific product page?**\
Yes — this scraper is designed to work with category pages and detail pages.

**Can I scrape products from pharmacies and beauty categories?**\
Yes — the scraper supports any category available on Ninja, including groceries, pharmacies, beauty products, and household items.

**Which Ninja markets are supported?**\
The scraper currently supports all Ninja markets:

- 🇸🇦 Saudi Arabia (`sa`)
- 🇧🇭 Bahrain (`bh`)
- 🇶🇦 Qatar (`qa`)
- 🇰🇼 Kuwait (`kw`)

***

### 🔗 Want More Ecommerce Data?

If you found this scraper useful, check out our other ecommerce scrapers:

- 🏠 [Bosch Home Appliances Scraper](https://apify.com/boring_internet_explorer/bosch-home-appliances-scraper) — Extract Bosch product data across 32 European markets
- 🏠 [Siemens Home Appliances Scraper](https://apify.com/boring_internet_explorer/siemens-home-appliances-scraper) — Extract Siemens product data across 21 European markets
- 🏠 [Electrolux Product Scraper](https://apify.com/boring_internet_explorer/electrolux-product-scraper) — Extract Electrolux product data across 31 European markets
- 🏠 [AEG Product Scraper](https://apify.com/boring_internet_explorer/aeg-product-scraper) — Extract AEG product data across 24 European markets
- 🏠 [Juno Product Scraper](https://apify.com/boring_internet_explorer/juno-product-scraper) — Extract Juno product data from Juno Germany (juno.de)
- 🏠 [NEFF Home Appliances Scraper](https://apify.com/boring_internet_explorer/neff-home-appliances-scraper) — Extract NEFF product data across 20 European markets
- 🏠 [GAGGENAU Home Appliances Scraper](https://apify.com/boring_internet_explorer/gaggenau-home-appliances-scraper) — Extract GAGGENAU product data across 17 European markets
- 🔧 [Electrolux Spare Parts Scraper](https://apify.com/boring_internet_explorer/electrolux-spare-parts-scraper) — Extract Electrolux genuine spare parts data across 18 European markets
- 🔧 [AEG Spare Parts Scraper](https://apify.com/boring_internet_explorer/aeg-spare-parts-scraper) — Extract AEG genuine spare parts data across European markets
- 🔧 [Zanussi Spare Parts Scraper](https://apify.com/boring_internet_explorer/zanussi-spare-parts-scraper) — Extract Zanussi genuine spare parts data across 7 European markets

# Actor input Schema

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

URLs to scrape

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

The maximum number of items to fetch

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

Your proxy configuration from Apify

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://ananinja.com/sa/ar/category/fruits-vegetables#fruits-vegetables-summer-fruits-fruits-vegetables"
    }
  ],
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "startUrls": [
        {
            "url": "https://ananinja.com/sa/ar/category/fruits-vegetables#fruits-vegetables-summer-fruits-fruits-vegetables"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("boring_internet_explorer/ninja-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 = { "startUrls": [{ "url": "https://ananinja.com/sa/ar/category/fruits-vegetables#fruits-vegetables-summer-fruits-fruits-vegetables" }] }

# Run the Actor and wait for it to finish
run = client.actor("boring_internet_explorer/ninja-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 '{
  "startUrls": [
    {
      "url": "https://ananinja.com/sa/ar/category/fruits-vegetables#fruits-vegetables-summer-fruits-fruits-vegetables"
    }
  ]
}' |
apify call boring_internet_explorer/ninja-product-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Ninja 🥷🏽 نينجا Product Scraper",
        "description": "Extract product data from ananinja.com — prices, stock availability, brands, images, product IDs, and category for groceries, pharmacy, beauty, and household products across Saudi Arabia, Bahrain, Qatar, and Kuwait. Ideal for price monitoring, catalog synchronization, and market research.",
        "version": "0.0",
        "x-build-id": "bpz1VC7cblJ0ShjIL"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/boring_internet_explorer~ninja-product-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-boring_internet_explorer-ninja-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/boring_internet_explorer~ninja-product-scraper/runs": {
            "post": {
                "operationId": "runs-sync-boring_internet_explorer-ninja-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/boring_internet_explorer~ninja-product-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-boring_internet_explorer-ninja-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": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "URLs to scrape",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxItems": {
                        "title": "Max items",
                        "type": "integer",
                        "description": "The maximum number of items to fetch",
                        "default": 5
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Your proxy configuration from Apify",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
