# Ninja Grocery Product Scraper: Prices and Catalog (`happyendpoint/ninja-saudi-grocery-product-scraper`) Actor

Read the grocery, beauty and pharmacy catalog that Ninja serves in Saudi Arabia: find the stores at a delivery point, then search products, browse a category or brand, and get prices, discounts, units, categories and brands for price monitoring.

- **URL**: https://apify.com/happyendpoint/ninja-saudi-grocery-product-scraper.md
- **Developed by:** [Happy Endpoint](https://apify.com/happyendpoint) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **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

### What this Actor does

Supermarket shelves in Saudi Arabia are online on Ninja, and this Actor turns them into a table. Start with the delivery point to find the store that serves each catalog, then use that store number to search products by keyword, list a whole category or brand, or look up products by ID. Each product row carries the price in riyals and in halalas, whether it is discounted, the unit it is sold in and its brand and category numbers; a detail lookup adds the stock count, the price before the discount and availability. Categories, brands, category sections and product bundles complete the picture.

The rows are the catalog that the Ninja grocery, beauty and pharmacy stores show for a store number: products, prices, categories, brands and bundles.

### Use cases

- Track the shelf price of staple goods in several cities and see when a discount starts.
- Build a price index of one brand across its products in a store.
- Map the category tree of the grocery, beauty or pharmacy catalog before a product-matching project.
- Check which products of a basket are available now and how many units the store holds.
- Find the bundles a store sells and the products inside each.

### How to use

1. Open the Actor's input form in Apify Console, or prepare a JSON input for the API.
2. Pick an `operation`: each one is a different kind of request to Ninja.
3. Set `maxItems` to the number of results you need. It is the only quantity setting; paging is handled for you.
4. Start the run. The results land in the run's dataset, where you can download them as JSON, CSV, Excel and
   other formats, or read them through the Apify API.

This is the example input, the one the input form starts with:

```json
{
  "operation": "verticals",
  "maxItems": 10,
  "latitude": 24.7136,
  "longitude": 46.6753
}
```

### Input

| Field | Type | Description | Used by |
| --- | --- | --- | --- |
| `operation` | string | Which data to fetch. Each option is one kind of request. | all operations |
| `maxItems` | integer | The most results to return. The run stops once it has this many. | all operations |
| `storeId` | string | The number of the store whose shelves to read. Run Stores at a point for your delivery point and take the store_id of the catalog you want: the number differs by place and by catalog. | Search products, Products of a category, Products of a brand, Product details, Categories, Brands |
| `vertical` | string | Which part of the store to read: grocery, beauty or pharmacy. Required for Categories and Category sections. | Search products, Products of a category, Products of a brand, Product details, Categories, Category sections, Brands |
| `productIds` | string | One or more catalog product numbers, with a comma between them, up to 50. Use the product_id of a search row, not its store-specific id. | Product details |
| `productId` | string | The catalog number of the product that has a bundle, as the product_id of a search row. | Product bundle |
| `latitude` | number | North-south position of the place where goods would be delivered, as a decimal number. Stores are found for that point. | Stores at a point |
| `longitude` | number | East-west position of the delivery place, as a decimal number. | Stores at a point |
| `language` | string | The language of names and labels in the rows. Leave it empty for English. Product rows keep both the English and the Arabic name where the site has them. | Stores at a point, Search products, Products of a category, Products of a brand, Product details, Categories, Category sections, Brands, Product bundle |
| `country` | string | The country whose category sections to read. | Category sections |
| `query` | string | A product name or word, in Arabic or English, to look for in the store. For Brands it narrows the list to brand names that match. | Search products, Brands |
| `categoryIds` | string | One or more category numbers from Categories, with a comma between them, up to 20. | Products of a category |
| `subCategoryIds` | string | Narrow the chosen categories to these subcategory numbers, with a comma between them, up to 20. | Products of a category |
| `brandCode` | string | The short code of one brand, as Brands returns it in the code of each row. It is a code, not the brand number or its display name. | Products of a brand, Brands |
| `parentCategoryId` | string | Return only the direct children of this category number. Leave it empty to list every level. | Categories |
| `topLevelOnly` | boolean | Return only the root categories, a short overview of the whole tree. | Categories |
| `includePrescription` | boolean | Allow products that need a prescription in pharmacy results. Leave it empty for the site default. | Search products, Products of a category, Products of a brand, Product details |

What each field accepts, the fields each operation requires and an example input for each are under Request and response schemas below.

### Output

Every row holds the run's own fields first (`operation`, `scrapedAt` and `sourceUrl`), then the
core fields `id`, `url`, `title`, `price`, `currency`, `location`, and then every field of the source item as Ninja
returns it. A field with no value on Ninja is empty in the row;
the example below shows only fields that have a value.
The dataset has an overview view and one view per operation.

The fields of each operation's rows are under Request and response schemas below.

An example of Stores at a point results.
Long lists show only their first items and long texts are cut short here; a real row holds everything in full:

```json output-excerpt
[
  {
    "operation": "verticals",
    "scrapedAt": "2026-11-23T07:18:57.519Z",
    "id": "19",
    "title": "RETAIL",
    "vertical": "RETAIL",
    "status": "ENABLED",
    "is_default": true,
    "store_id": "19",
    "store": {
      "id": "19",
      "code": "JED-RAW001",
      "status": "READY",
      "country": "sa",
      "delayed_delivery": false,
      "delayed_delivery_notice": {
        "title": "Heavy traffic notice",
        "description": "You can place your order now, but it might take a bit longer than usual due to high demand. Rest assured, we're working tirelessly and are excited to get your order to you as soon as possible.\nThank y…"
      },
      "working_hours": [
        {
          "weekday": 0,
          "start_minutes": 0,
          "end_minutes": 1440,
          "start_time": "00:00",
          "end_time": "24:00",
          "open_24h": true
        },
        {
          "weekday": 1,
          "start_minutes": 0,
          "end_minutes": 1440,
          "start_time": "00:00",
          "end_time": "24:00",
          "open_24h": true
        },
        {
          "weekday": 2,
          "start_minutes": 0,
          "end_minutes": 1440,
          "start_time": "00:00",
          "end_time": "24:00",
          "open_24h": true
        }
      ]
    },
    "on_demand_delivery": true,
    "scheduled_delivery": false,
    "contact_numbers": [
      {
        "number": "+1 202 555 0143"
      }
    ]
  }
]
```

### Pricing

This Actor uses pay-per-event pricing: a start fee of $0.002 for each run, plus
$0.002 for each result in the dataset. Every operation is priced the same way.

| Operation | Start fee per run | Price per result |
| --- | --- | --- |
| Stores at a point | $0.002 | $0.002 |
| Search products | $0.002 | $0.002 |
| Products of a category | $0.002 | $0.002 |
| Products of a brand | $0.002 | $0.002 |
| Product details | $0.002 | $0.002 |
| Categories | $0.002 | $0.002 |
| Category sections | $0.002 | $0.002 |
| Brands | $0.002 | $0.002 |
| Product bundle | $0.002 | $0.002 |

Worked examples for one run:

| Results | Total cost |
| --- | --- |
| 10 | $0.022 |
| 100 | $0.202 |
| 1,000 | $2.002 |

Invalid input, a not-found answer or an internal error adds no charge of its own: such a run pays the start
fee plus only the results it delivered before it stopped (none for invalid input). To cap what one run may
cost, set the maximum cost per run when you start it.

### Limits and tips

- One run returns at most 1,000 results; the input form allows no higher `maxItems`.
- Set `maxItems` to what you need: you pay per result, and a smaller run finishes sooner.
- A request that matches nothing ends with an empty dataset and costs only the start fee.
- A store number belongs to a place and a catalog. Take it from Stores at a point for the delivery point you care about, and expect an empty result for an unknown store.
- Product search returns up to 1,000 products and the Actor never reads more than that in one run. A very broad category can hold more rows than a run returns.
- Product IDs, category IDs and brand codes come from earlier results: copy them from a search, category or brand row.
- Category sections and category lists use the catalog setting. Prescription products appear only when you allow them.

### Resume a run that stopped at your cost limit

If you set a maximum cost per run and a run reaches it, the run stops early. To get the rest, resurrect the
run in Apify Console, or through the API, with a higher limit. The Actor resumes where it stopped: results
already in the dataset are not fetched or charged again, and the run still ends at `maxItems`.
Resurrecting can charge the start fee again.

### Running without input

The example input above is also this Actor's example run input. Apify's API documents that a run started with
no input at all uses the example run input: Stores at a point, at most 10 results,
which costs at most $0.022 (the start fee plus 10 results). For your own runs, always send an input with the fields you need.

### FAQ

#### Do I need an account on Ninja?

No. The Actor reads public data, so an Apify account is all you need.

#### How do I get the data into my own tools?

Download the dataset from the run's page, or read it through the Apify API and its integrations.

#### How do I find the store number?

Run Stores at a point with your latitude and longitude. Each row is one catalog with its store_id, which you pass as Store ID to every product, category and brand operation.

#### Which prices do I get, and in what currency?

Each product has a price in riyals, the same price in halalas, and the currency. The detail lookup also shows the price before a discount.

#### What is the difference between id and product_id on a product row?

The id is tied to the store, while the product_id is the catalog number shared across stores. Use product_id for lookups and bundles.

#### Can I read Arabic names?

Yes. Set the language to Arabic, and category and brand rows also keep the Arabic name in a field of its own.

### Request and response schemas

This section lists every input field with what it accepts, then, for each operation, the fields it reads, an
example input and the fields of its rows. All of it is built from this Actor's input schema and dataset views, so
it matches the input form; the Input table above describes each input field.

Every input field and what it accepts:

| Field | Label | Type | Allowed values and limits |
| --- | --- | --- | --- |
| `operation` | Operation | string | `verticals` (Stores at a point), `productSearch` (Search products), `productsByCategory` (Products of a category), `productsByBrand` (Products of a brand), `productDetails` (Product details), `categories` (Categories), `categorySections` (Category sections), `brands` (Brands), `productBundle` (Product bundle) |
| `maxItems` | Maximum results | integer | 1 to 1,000; default 100 |
| `storeId` | Store ID | string | matching `^[0-9]{1,12}$` |
| `vertical` | Catalog | string | `RETAIL` (Grocery and household), `BEAUTY` (Beauty and personal care), `PHARMACY` (Pharmacy) |
| `productIds` | Product IDs | string | matching `^[0-9]{1,12}(,[0-9]{1,12}){0,49}$` |
| `productId` | Product ID | string | matching `^[0-9]{1,12}$` |
| `latitude` | Latitude | number | -90 to 90 |
| `longitude` | Longitude | number | -180 to 180 |
| `language` | Language | string | `en` (English), `ar` (Arabic) |
| `country` | Country | string | `sa` (Saudi Arabia), `kw` (Kuwait), `qa` (Qatar), `bh` (Bahrain) |
| `query` | Keyword | string | at most 100 characters |
| `categoryIds` | Category IDs | string | matching `^[0-9]{1,12}(,[0-9]{1,12}){0,19}$` |
| `subCategoryIds` | Subcategory IDs | string | matching `^[0-9]{1,12}(,[0-9]{1,12}){0,19}$` |
| `brandCode` | Brand code | string | at most 60 characters |
| `parentCategoryId` | Parent category ID | string | matching `^[0-9]{1,12}$` |
| `topLevelOnly` | Top level only | boolean | - |
| `includePrescription` | Include prescription products | boolean | - |

- **Type** of a row field: its JSON type in the rows the operation returns; `-` means no type is listed for it.

Every row starts with these fields:

| Field | Type | Meaning |
| --- | --- | --- |
| `operation` | string | The operation that returned the row. |
| `scrapedAt` | string | When the row's page of results was read, as an ISO 8601 date and time in UTC. |
| `sourceUrl` | string or null | The item's own page: the `url` value when it is a full web link, else null. |
| `id` | any type, or null | The item's ID. |
| `url` | any type, or null | The item's link. |
| `title` | any type, or null | The item's title or name. |
| `price` | any type, or null | The item's price. |
| `currency` | any type, or null | The currency of the price. |
| `location` | any type, or null | The item's location. |

The six core fields, `id` to `location`, are null when the source has no such value or the operation
does not fill them. After them come the fields of the source item, each under the name Ninja gives it; a source
field with one of the names above, or named `raw`, is kept under `raw` instead.

#### Stores at a point

Request: set `operation` to `verticals`.

- Required: `latitude`, `longitude`.
- Optional: `maxItems`, `language`.

Example input:

```json
{
  "operation": "verticals",
  "maxItems": 10,
  "latitude": 24.7136,
  "longitude": 46.6753
}
```

Response: the fields the dataset's Stores at a point view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `vertical` | string |
| `status` | string |
| `is_default` | boolean |
| `store_id` | string |
| `store` | object |
| `on_demand_delivery` | boolean |
| `scheduled_delivery` | boolean |
| `contact_numbers` | array |

#### Search products

Request: set `operation` to `productSearch`.

- Required: `storeId`, `query`.
- Optional: `maxItems`, `vertical`, `language`, `includePrescription`.

Example input. Replace each value in angle brackets with your own:

```json
{
  "operation": "productSearch",
  "maxItems": 100,
  "storeId": "<Store ID>",
  "query": "<Keyword>"
}
```

Response: the fields the dataset's Search products view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `product_id` | string |
| `name` | string |
| `brand_code` | string |
| `currency` | string |
| `price` | number |
| `is_discounted` | boolean |
| `unit_of_measure` | string |
| `category_ids` | array |

#### Products of a category

Request: set `operation` to `productsByCategory`.

- Required: `storeId`, `categoryIds`.
- Optional: `maxItems`, `vertical`, `language`, `subCategoryIds`, `includePrescription`.

Example input. Replace each value in angle brackets with your own:

```json
{
  "operation": "productsByCategory",
  "maxItems": 100,
  "storeId": "<Store ID>",
  "categoryIds": "<Category IDs>"
}
```

Response: the fields the dataset's Products of a category view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `product_id` | string |
| `name` | string |
| `currency` | string |
| `price` | number |
| `is_discounted` | boolean |
| `category_ids` | array |
| `sub_category_ids` | array |

#### Products of a brand

Request: set `operation` to `productsByBrand`.

- Required: `storeId`, `brandCode`.
- Optional: `maxItems`, `vertical`, `language`, `includePrescription`.

Example input. Replace each value in angle brackets with your own:

```json
{
  "operation": "productsByBrand",
  "maxItems": 100,
  "storeId": "<Store ID>",
  "brandCode": "<Brand code>"
}
```

Response: the fields the dataset's Products of a brand view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `product_id` | string |
| `name` | string |
| `brand_code` | string |
| `currency` | string |
| `price` | number |
| `is_discounted` | boolean |
| `unit_of_measure` | string |

#### Product details

Request: set `operation` to `productDetails`.

- Required: `storeId`, `productIds`.
- Optional: `maxItems`, `vertical`, `language`, `includePrescription`.

Example input. Replace each value in angle brackets with your own:

```json
{
  "operation": "productDetails",
  "maxItems": 100,
  "storeId": "<Store ID>",
  "productIds": "<Product IDs>"
}
```

Response: the fields the dataset's Product details view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `product_id` | string |
| `store_id` | string |
| `name` | string |
| `brand_code` | string |
| `currency` | string |
| `price` | number |
| `original_price` | number |
| `is_discounted` | boolean |
| `quantity` | number |
| `is_available` | boolean |

#### Categories

Request: set `operation` to `categories`.

- Required: `storeId`, `vertical`.
- Optional: `maxItems`, `language`, `parentCategoryId`, `topLevelOnly`.

Example input. Replace each value in angle brackets with your own:

```json
{
  "operation": "categories",
  "maxItems": 100,
  "storeId": "<Store ID>",
  "vertical": "<Catalog>"
}
```

Response: the fields the dataset's Categories view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `id` | string |
| `name` | string |
| `name_ar` | string |
| `parent_id` | string |
| `is_top_level` | boolean |
| `vertical` | string |
| `store_count` | number |
| `images` | array |

#### Category sections

Request: set `operation` to `categorySections`.

- Required: `vertical`, `country`.
- Optional: `maxItems`, `language`.

Example input. Replace each value in angle brackets with your own:

```json
{
  "operation": "categorySections",
  "maxItems": 100,
  "vertical": "<Catalog>",
  "country": "<Country>"
}
```

Response: the fields the dataset's Category sections view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `id` | string |
| `name` | string |
| `name_ar` | string |
| `description` | string |
| `country` | string |
| `vertical` | string |
| `weight` | number |

#### Brands

Request: set `operation` to `brands`.

- Required: `storeId`.
- Optional: `maxItems`, `vertical`, `language`, `query`, `brandCode`.

Example input. Replace each value in angle brackets with your own:

```json
{
  "operation": "brands",
  "maxItems": 100,
  "storeId": "<Store ID>"
}
```

Response: the fields the dataset's Brands view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `id` | string |
| `code` | string |
| `name` | string |
| `name_ar` | string |
| `image` | string |
| `store_count` | number |
| `is_grocery` | boolean |
| `is_beauty` | boolean |
| `is_pharmacy` | boolean |

#### Product bundle

Request: set `operation` to `productBundle`.

- Required: `productId`.
- Optional: `maxItems`, `language`.

Example input. Replace each value in angle brackets with your own:

```json
{
  "operation": "productBundle",
  "maxItems": 100,
  "productId": "<Product ID>"
}
```

Response: the fields the dataset's Product bundle view shows. Each row also holds every other field of the
source item.

| Field | Type |
| --- | --- |
| `product_id` | string |
| `name` | string |
| `savings_percentage` | - |
| `bundled_product_count` | number |
| `bundled_products` | array |

### More Ninja Actors

- [ninja-saudi-restaurant-scraper](https://apify.com/happyendpoint/ninja-saudi-restaurant-scraper)

### Related Actors

- [igraal-merchants-cashback-scraper](https://apify.com/happyendpoint/igraal-merchants-cashback-scraper)
- [haraj-listings-search-scraper](https://apify.com/happyendpoint/haraj-listings-search-scraper)

### Disclaimer

This Actor is an independent tool. It is not affiliated with, endorsed by or sponsored by Ninja. All
trademarks belong to their owners.

### Is it legal to use this data?

This Actor collects data that Ninja shows publicly.
Some fields hold business contact data: `contact_numbers`.
Personal data is protected by laws such as the GDPR in the EU. Collect and use it only when you have a lawful
reason, keep only what you need, and do not use it for unsolicited messages. If you are unsure, ask a lawyer.

# Changelog

This Actor's version history is a separate document: https://apify.com/happyendpoint/ninja-saudi-grocery-product-scraper/changelog.md

# Actor input Schema

## `operation` (type: `string`):

Which data to fetch. Each option is one kind of request.

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

The most results to return. The run stops once it has this many.

## `storeId` (type: `string`):

The number of the store whose shelves to read. Run Stores at a point for your delivery point and take the store_id of the catalog you want: the number differs by place and by catalog. Used by: Search products, Products of a category, Products of a brand, Product details, Categories, Brands.

## `vertical` (type: `string`):

Which part of the store to read: grocery, beauty or pharmacy. Required for Categories and Category sections. Used by: Search products, Products of a category, Products of a brand, Product details, Categories, Category sections, Brands.

## `productIds` (type: `string`):

One or more catalog product numbers, with a comma between them, up to 50. Use the product_id of a search row, not its store-specific id. Used by: Product details.

## `productId` (type: `string`):

The catalog number of the product that has a bundle, as the product_id of a search row. Used by: Product bundle.

## `latitude` (type: `number`):

North-south position of the place where goods would be delivered, as a decimal number. Stores are found for that point. Used by: Stores at a point.

## `longitude` (type: `number`):

East-west position of the delivery place, as a decimal number. Used by: Stores at a point.

## `language` (type: `string`):

The language of names and labels in the rows. Leave it empty for English. Product rows keep both the English and the Arabic name where the site has them. Used by: Stores at a point, Search products, Products of a category, Products of a brand, Product details, Categories, Category sections, Brands, Product bundle.

## `country` (type: `string`):

The country whose category sections to read. Used by: Category sections.

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

A product name or word, in Arabic or English, to look for in the store. For Brands it narrows the list to brand names that match. Used by: Search products, Brands.

## `categoryIds` (type: `string`):

One or more category numbers from Categories, with a comma between them, up to 20. Used by: Products of a category.

## `subCategoryIds` (type: `string`):

Narrow the chosen categories to these subcategory numbers, with a comma between them, up to 20. Used by: Products of a category.

## `brandCode` (type: `string`):

The short code of one brand, as Brands returns it in the code of each row. It is a code, not the brand number or its display name. Used by: Products of a brand, Brands.

## `parentCategoryId` (type: `string`):

Return only the direct children of this category number. Leave it empty to list every level. Used by: Categories.

## `topLevelOnly` (type: `boolean`):

Return only the root categories, a short overview of the whole tree. Used by: Categories.

## `includePrescription` (type: `boolean`):

Allow products that need a prescription in pharmacy results. Leave it empty for the site default. Used by: Search products, Products of a category, Products of a brand, Product details.

## Actor input object example

```json
{
  "operation": "verticals",
  "maxItems": 10,
  "latitude": 24.7136,
  "longitude": 46.6753
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `verticals` (type: `string`):

No description

## `productSearch` (type: `string`):

No description

## `productsByCategory` (type: `string`):

No description

## `productsByBrand` (type: `string`):

No description

## `productDetails` (type: `string`):

No description

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

No description

## `categorySections` (type: `string`):

No description

## `brands` (type: `string`):

No description

## `productBundle` (type: `string`):

No description

## `summary` (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 = {
    "operation": "verticals",
    "maxItems": 10,
    "latitude": 24.7136,
    "longitude": 46.6753
};

// Run the Actor and wait for it to finish
const run = await client.actor("happyendpoint/ninja-saudi-grocery-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 = {
    "operation": "verticals",
    "maxItems": 10,
    "latitude": 24.7136,
    "longitude": 46.6753,
}

# Run the Actor and wait for it to finish
run = client.actor("happyendpoint/ninja-saudi-grocery-product-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 '{
  "operation": "verticals",
  "maxItems": 10,
  "latitude": 24.7136,
  "longitude": 46.6753
}' |
apify call happyendpoint/ninja-saudi-grocery-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,happyendpoint/ninja-saudi-grocery-product-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/6ShnLiG3sFo0xRqMG/builds/KV54I9AeCzBIMUj1U/openapi.json
