# Tata 1mg Keyword Rank Tracker (`ikmal_suzali_atr/1mg-rank`) Actor

Full Tata 1mg (1mg.com, India) search results per keyword with position, price, MRP, rating and sponsored ("Ad") flag: see where a brand ranks and who holds the paid slots. Needs an Indian proxy (Cloudflare geo rule).

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

## Pricing

from $4.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?

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

## Tata 1mg Keyword Rank Tracker

Captures the full Tata 1mg (1mg.com, India) search results slate for each keyword, with the rank of every product and the sponsored ("Ad") slots marked. Use it to see where a medicine, supplement or wellness brand ranks on the terms shoppers actually type, and who is buying the paid slots above it.

### What you get

- One row per search result position: `keyword`, `page`, `position`, `id`, `name`, `price`, `original_price`, `discount_percent` and `product_url`.
- `is_sponsored` on paid results, taken from the ad fields behind the "Ad" badge, with `ad_uclid` naming the placement where 1mg exposes it.
- Ratings as `rating` and `rating_count`, stock as `in_stock`.
- `rx_required`, so prescription results are separable from over-the-counter ones.
- `pack_label` for pack or strip size, `eta` for the delivery promise, `badge` for any tag on the card.
- City-bound capture, because assortment and delivery on 1mg are set at city level.

### Input

Give the keywords to rank and the delivery city.

```json
{
  "keywords": ["paracetamol", "vitamin c"],
  "locale": "in",
  "city": "Gurgaon",
  "pages": 2,
  "delayMs": 1200,
  "callsPerSession": 60,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "IN"
  }
}
```

- `keywords` (required): search terms to rank. Duplicates are ignored.
- `city`: the delivery city sent with every request. Default is Gurgaon.
- `pages`: result pages to capture per keyword. Pages are requested 40 results at a time.
- `delayMs` and `callsPerSession`: pacing and session rotation.
- `proxyConfiguration`: egress for the run. An Indian residential proxy is the default and is required.

### Output

One dataset row per search result position.

```json
{
  "platform": "1mg",
  "locale": "in",
  "keyword": "paracetamol",
  "page": 1,
  "position": 1,
  "id": "331150",
  "name": "Dolo 650mg Tablet",
  "price": 30.9,
  "original_price": 34.5,
  "discount_percent": 10,
  "currency": "INR",
  "rating": 4.6,
  "rating_count": 5210,
  "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/dolo-650-tablet-331150",
  "captured_at": "2026-09-12T03:35:09.757Z"
}
```

`brand` and `seller` are always null: 1mg publishes neither on search results. `total_results` is null because 1mg's search response does not report a match count. `ad_uclid` is null on organic rows.

### Use cases

- Rank tracking for a molecule or brand across a keyword set, from `keyword` and `position`.
- Ad-slot share on high-intent terms: how many of the first results carry `is_sponsored` true.
- Competitive price benchmarking at rank, pairing `position` with `price` and `discount_percent`.
- Availability checks on priority keywords using `in_stock`.
- Prescription versus over-the-counter mix behind a search term, from `rx_required`.

### Notes and limits

- An Indian residential proxy is required. 1mg blocks every non-Indian egress at the edge, and the run stops with a clear message instead of returning partial data.
- Search paging uses a scroll cursor returned by the previous page, so pages are fetched in order. Page 2 cannot be requested without page 1.
- Results are requested 40 at a time and `pages` is capped at 10 per keyword.
- A keyword with no matches finishes cleanly with zero rows and a warning naming the keyword.
- Assortment is city level, not pincode level.
- Only the India storefront exists.

### FAQ

**Do I need a proxy?** Yes, and it is not optional. Use an Indian residential proxy, which is the actor default.

**How many results can I get?** 40 results a page and up to 10 pages per keyword, so up to 400 ranked positions per keyword per run.

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

**How is the sponsored flag detected?** From the ad fields 1mg attaches to a paid result, the same data behind the "Ad" badge on the site. Organic rows carry none of them.

**Does changing the city change the ranks?** It changes the delivery context, and assortment on 1mg is set per city. In testing the same SKUs were served for Gurgaon and Mumbai on several terms, so compare cities on your own keyword set before assuming they differ.

# Actor input Schema

## `keywords` (type: `array`):

Search keywords to rank. Duplicates are ignored.

## `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).

## `pages` (type: `integer`):

Result pages to capture per keyword. Leave at 0 to capture every result page; the run stops as soon as the results end.

## `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
{
  "keywords": [
    "paracetamol"
  ],
  "locale": "in",
  "city": "Gurgaon",
  "pages": 0,
  "delayMs": 1200,
  "callsPerSession": 60,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "IN"
  }
}
```

# Actor output Schema

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

One row per search result position.

## `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 = {
    "keywords": [
        "paracetamol"
    ],
    "pages": 0
};

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

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

```

## MCP server setup

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

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/39W4RvUEisicnGsKQ/builds/RCUXA3R3ve13uY2Mp/openapi.json
