# Tata 1mg Catalogue by Category (`ikmal_suzali_atr/1mg-catalog`) Actor

Every product on a Tata 1mg category listing (1mg.com, India): id, name, price, MRP, rating, stock and sponsored ("Ad") flag, page by page, optionally with subcategories. Needs an Indian proxy (Cloudflare geo rule). Dual-mode: also an ATR BullMQ worker.

- **URL**: https://apify.com/ikmal\_suzali\_atr/1mg-catalog.md
- **Developed by:** [AtTheRate AI](https://apify.com/ikmal_suzali_atr) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 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

## Tata 1mg Catalogue by Category

Pulls every product on a Tata 1mg category listing (1mg.com, India), page by page, with price, MRP, discount, rating, stock and the sponsored ("Ad") tiles marked. Use it to mirror a pharmacy category, track discounting on OTC and supplement ranges, or measure who is paying for placement.

### What you get

- One row per product: `id`, `name`, `price`, `original_price`, `discount_percent`, `currency` and `product_url`.
- `is_sponsored` on paid tiles, taken from the ad fields behind the "Ad" badge, with `ad_uclid` naming the placement.
- `page` and `position` for exact rank inside the category.
- Ratings as `rating` and `rating_count`, stock as `in_stock`.
- `rx_required`, so prescription items can be separated from over-the-counter stock.
- `pack_label` for the pack size, `eta` for the delivery promise, and optional subcategory crawling.

### Input

Give one or more category ids, slugs, URLs or names, and the delivery city.

```json
{
  "categories": ["734", "Vitamin D"],
  "locale": "in",
  "city": "Gurgaon",
  "maxPages": 2,
  "expandSubcategories": false,
  "delayMs": 1200,
  "callsPerSession": 60,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "IN"
  }
}
```

- `categories` (required): `"734"`, `"/categories/fitness-supplements/vitamin-c-734"` or a name such as `"Vitamin C"`. Names resolve through 1mg's category tree.
- `city`: the delivery city. Assortment and delivery on 1mg are city level, and the default is Gurgaon.
- `maxPages`: pages per category. `0` means every page. Pages are requested 40 products at a time.
- `expandSubcategories`: also crawl the children of each category.
- `proxyConfiguration`: egress for the run. An Indian residential proxy is the default and is required.

### Output

One dataset row per product per page.

```json
{
  "platform": "1mg",
  "locale": "in",
  "category": "734",
  "category_title": "Vitamin C",
  "breadcrumbs": "Fitness & Supplements > Vitamins & Minerals > Vitamin C",
  "page": 1,
  "position": 1,
  "id": "331150",
  "name": "Limcee 500mg Chewable Tablet Orange",
  "price": 22.5,
  "original_price": 25,
  "discount_percent": 10,
  "currency": "INR",
  "rating": 4.5,
  "rating_count": 2841,
  "in_stock": true,
  "is_sponsored": true,
  "ad_uclid": "9f1c2a7b",
  "rx_required": false,
  "pack_label": "strip of 15 tablets",
  "eta": "Delivery by tomorrow",
  "product_url": "https://www.1mg.com/drugs/limcee-500mg-chewable-tablet-orange-331150",
  "fetched_at": "2026-09-12T03:35:09.757Z"
}
```

`brand` and `seller` are always null: 1mg does not publish either on category listings. `ad_uclid` is null on organic rows.

### Use cases

- Price and MRP tracking on OTC, supplement and wellness ranges from `price`, `original_price` and `discount_percent`.
- Share of shelf inside a therapy area, counting rows by `name` pattern and `position`.
- Ad-slot share: how much of page one carries `is_sponsored` true.
- Availability monitoring from `in_stock`, and prescription versus OTC mix from `rx_required`.

### Notes and limits

- An Indian residential proxy is required. 1mg blocks every non-Indian egress outright, and the actor stops with a clear message rather than returning partial data.
- Category paging uses an offset cursor returned by the previous page, so pages are fetched in order and cannot be jumped. Ask for page 1 before page 2.
- Pages are requested 40 products at a time.
- A category name that matches nothing in the tree returns zero rows for that entry with a warning, and the run continues.
- Assortment is city level, not pincode level.
- Only the India storefront exists.

### FAQ

**Do I need a proxy?** Yes, and it is not optional here. Tata 1mg blocks non-Indian traffic at the edge, so use an Indian residential proxy. That is the actor default.

**How many results can I get?** Everything 1mg lists for the category, 40 products a request. `maxPages` caps it, `0` means no cap.

**Does it need a login or an API key?** No.

**How is the sponsored flag detected?** From the ad fields 1mg attaches to a paid tile, the same data behind the "Ad" badge. Organic rows have no ad fields and `ad_uclid` is null.

**Does the city really change the results?** It sets assortment and delivery estimates, which are city level on 1mg. In testing the same SKUs were served for Gurgaon and Mumbai on several categories, so treat it as a delivery context rather than a guarantee of different ranges.

# Actor input Schema

## `categories` (type: `array`):

Tata 1mg category ids, slugs, URLs or names, e.g. "734", "/categories/fitness-supplements/vitamin-c-734" or "Vitamin C" (resolved from the 1mg category tree).

## `locale` (type: `string`):

Which storefront / locale.

## `city` (type: `string`):

Delivery city sent as x-city (assortment/ETA are city-level on 1mg; the same SKUs were served for Gurgaon and Mumbai).

## `maxPages` (type: `integer`):

0 = all pages.

## `expandSubcategories` (type: `boolean`):

Also crawl each category's subcategories when the site exposes them.

## `delayMs` (type: `integer`):

Pause between page fetches.

## `callsPerSession` (type: `integer`):

Re-mint the session after this many page fetches.

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

On the Apify platform this decides egress. A residential proxy in the storefront's country is recommended (IN for the default). On our own servers it is ignored and our residential proxy is used.

## Actor input object example

```json
{
  "categories": [
    "734"
  ],
  "locale": "in",
  "city": "Gurgaon",
  "maxPages": 0,
  "expandSubcategories": false,
  "delayMs": 1200,
  "callsPerSession": 60,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "IN"
  }
}
```

# Actor output Schema

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

One row per product.

## `summary` (type: `string`):

Counts for the run: what was requested, captured, skipped and failed.

# 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 = {
    "categories": [
        "734"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ikmal_suzali_atr/1mg-catalog").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 = { "categories": ["734"] }

# Run the Actor and wait for it to finish
run = client.actor("ikmal_suzali_atr/1mg-catalog").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 '{
  "categories": [
    "734"
  ]
}' |
apify call ikmal_suzali_atr/1mg-catalog --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ikmal_suzali_atr/1mg-catalog"
        }
    }
}
```

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/9fiQfqJ9fJlTfwgsC/builds/0plyb52HtDZUELmZM/openapi.json
