# Instamart Keyword Rank Tracker (`ikmal_suzali_atr/rank-instamart`) Actor

Organic + sponsored (ad) rank per keyword x store location on instamart. Dual-mode: the same capture\_many() runs in the ATR rank-instamart service on our servers.

- **URL**: https://apify.com/ikmal\_suzali\_atr/rank-instamart.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 $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?

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

## Swiggy Instamart Keyword Rank Tracker

Captures the full Swiggy Instamart search results slate for a keyword in a specific Indian location, with every product's rank and the paid slots marked. Quick commerce is store level, so each pincode resolves to the store serving that area and the ranks reflect the local assortment rather than a national average.

### What you get

- One row per search result position: `position`, `product_id`, `name`, `brand`, `price`, `mrp`, `in_stock` and `inventory`.
- `is_sponsored` on paid slots, read from the ad tracking Instamart attaches to a paid tile, with `ad_campaign_id` carrying that identifier.
- Full location context on every row: `location_label`, `pincode` and `store_id`, so ranks from different cities never get mixed up.
- `captured_at` on every row, so a time series can be built by appending runs.
- Ranks for the whole slate, not just one brand, so competitor rank and ad share stay derivable.

### Input

Give the keywords and at least one Indian pincode.

```json
{
  "keywords": ["atta"],
  "locations": [
    {
      "lat": 28.4595,
      "lon": 77.0266,
      "label": "Gurgaon-DLF",
      "pincode": "122002"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "IN"
  },
  "pages": 1
}
```

- `keywords` (required): search terms to rank. Duplicates are ignored.
- `pincodes`: Indian 6-digit pincodes, for example `["122002"]`. Each is resolved to coordinates and Instamart picks the store serving that point.
- `locations` (advanced): exact store targets as `{"label","lat","lon","pincode"}`.
- `pages`: accepted for consistency with the other rank trackers. Instamart returns one slate per keyword, so raising it does not fetch more.
- `proxyConfiguration`: egress for the run. An Indian residential proxy is the default and is required.

### Output

One dataset row per search result position, per keyword and location.

```json
{
  "captured_at": "2026-09-11T09:02:02+00:00",
  "platform": "instamart",
  "keyword": "atta",
  "location_label": "Gurgaon-DLF",
  "pincode": "122002",
  "store_id": "1394451",
  "position": 1,
  "is_sponsored": false,
  "ad_campaign_id": null,
  "product_id": "1I5XR52UWP",
  "name": "Aashirvaad Atta High Protein",
  "brand": "Aashirvaad",
  "price": 62,
  "mrp": 80,
  "in_stock": true,
  "inventory": 2
}
```

Live runs of one keyword in Gurgaon returned 32 rows with 13 and 14 of them sponsored. `ad_campaign_id` is null on organic rows.

### Use cases

- Keyword rank tracking for your own SKUs, city by city, from `keyword`, `position` and `location_label`.
- Ad-slot share on a quick-commerce platform where paid density is high: the sponsored share of a 32-row slate is often close to half.
- Competitor share of search, counting `brand` across the whole ranked slate.
- Price and MRP monitoring at rank, pairing `position` with `price` and `mrp`.
- Availability alerts from `in_stock` and `inventory`, per store.

### Notes and limits

- An Indian residential proxy is required. From other addresses Instamart serves a degraded page and its search endpoint refuses the request.
- Store resolution succeeds on roughly one exit address in four, so the actor retries a location on fresh sessions before calling it blocked. That is why a capture can take a minute.
- Instamart returns one slate per keyword rather than numbered pages, so `pages` has no effect. A live capture of a common grocery term returned 32 positions.
- Sessions degrade after roughly 60 to 70 listing calls regardless of pacing, so the actor rotates before that point and on first degradation.
- A keyword that matches nothing is reported as an empty capture with a warning, never as a clean zero.
- India only.

### FAQ

**Do I need a proxy?** Yes, an Indian residential one, which is the actor default. Other addresses get a degraded page rather than results.

**How many results can I get?** The full slate Instamart returns for the keyword at that store. Live tests returned 32 positions for a single grocery term.

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

**How does a pincode pick a store?** The pincode is resolved to coordinates, those coordinates are set as the delivery location before the search, and Instamart selects the serving store. It comes back in `store_id`.

**Can I capture several cities in one run?** Yes. Pass several pincodes or several `locations`, and every row is stamped with the location it came from.

# Actor input Schema

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

Search keywords to rank (required). Duplicates are ignored.

## `pincodes` (type: `array`):

Indian 6-digit pincodes to capture ranks for, e.g. 122002. Each is resolved to coordinates and the platform picks the store serving it; pincodes with no store nearby fail loudly rather than logging another city's ranks.

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

Result pages to walk per keyword.

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

On the Apify platform this decides egress (residential IN recommended; these platforms block datacenter IPs). On our servers it is ignored and our own residential proxy is used.

## `locations` (type: `array`):

Optional instead of pincodes: exact store targets \[{"label":"Gurgaon-DLF","lat":28.4595,"lon":77.0266,"pincode":"122002"}].

## Actor input object example

```json
{
  "keywords": [
    "shampoo",
    "atta"
  ],
  "pincodes": [
    "122002"
  ],
  "pages": 1,
  "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": [
        "shampoo",
        "atta"
    ],
    "pincodes": [
        "122002"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ikmal_suzali_atr/rank-instamart").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": [
        "shampoo",
        "atta",
    ],
    "pincodes": ["122002"],
}

# Run the Actor and wait for it to finish
run = client.actor("ikmal_suzali_atr/rank-instamart").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": [
    "shampoo",
    "atta"
  ],
  "pincodes": [
    "122002"
  ]
}' |
apify call ikmal_suzali_atr/rank-instamart --silent --output-dataset

```

## MCP server setup

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

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/0chcglLtkxbAbX0iP/builds/7OHxXKhZEqRU7f4Hf/openapi.json
