# Tata 1mg Scraper - Medicine Prices, MRP & Composition (`goat255/tata-1mg-scraper`) Actor

Scrape Tata 1mg medicines and health products by search, A to Z medicine index or product URL, without a login. Returns price, MRP, discount, manufacturer, composition, pack size, prescription flag, stock and ratings, with optional substitutes and side effects.

- **URL**: https://apify.com/goat255/tata-1mg-scraper.md
- **Developed by:** [Goutam Soni](https://apify.com/goat255) (community)
- **Categories:** E-commerce, Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Scraper - Medicine Prices, MRP and Composition

Extract medicines and health products from Tata 1mg without a login or API key. Search any medicine, salt or brand, sweep the A to Z medicine index, or paste product links, and every row comes back in one clean, structured shape with prices in Indian rupees.

### What it does

- **Search** - every product matching a phrase such as a medicine name, a salt, a brand or a health product, in the storefront's own ranking or sorted by price, popularity, rating or discount.
- **A to Z medicine index** - sweep the full medicine index by starting letter or prefix. Useful for building or refreshing a complete medicine catalogue.
- **Product URLs** - one fully detailed record per medicine or health product link.
- **Prices** - MRP, today's selling price, discount percentage and price per unit (per tablet, capsule or pack).
- **Medicine facts** - manufacturer, marketer, composition (salts and strengths), pack size, pack form, prescription flag, therapeutic class, stock and discontinued status.
- **Full product details (optional)** - uses, side effects, substitutes with their per-unit prices, storage, safety warnings, a fact box (chemical class, action class, habit forming), manufacturer and marketer addresses, and ratings with review counts.
- **Pagination** - walked automatically until your per-source limit is reached or the source runs out. Duplicates are removed across the whole run.

### Input

| Field | Type | Description |
|---|---|---|
| `searchQueries` | array | Phrases to search. Example: `paracetamol`, `vitamin d3`, `cough syrup`. |
| `catalogPrefixes` | array | Medicine index prefixes. Example: `a` for a broad sweep, `amox` to narrow it. |
| `productUrls` | array | Medicine or health product links. One detailed record each. |
| `maxItemsPerSource` | integer | Cap per phrase or prefix. Default 100. |
| `sort` | string | `relevance`, `popularity`, `rating`, `price_low`, `price_high`, `discount`. Search only. |
| `includeDetails` | boolean | Add the full product details to search and index rows. Default off. |
| `concurrency` | integer | Sources processed in parallel. Default 3. |
| `proxyConfiguration` | object | Apify Proxy by default. A refused source switches to a residential connection in India on its own. |

At least one of `searchQueries`, `catalogPrefixes` or `productUrls` is required.

#### Example input

```json
{
  "searchQueries": ["paracetamol", "vitamin d3"],
  "catalogPrefixes": ["amox"],
  "productUrls": ["https://www.1mg.com/drugs/example-650-tablet-123456"],
  "maxItemsPerSource": 200,
  "sort": "relevance",
  "includeDetails": false
}
```

### Output

Each item is one normalized product.

```json
{
  "type": "product",
  "id": "123456",
  "name": "Acmemol 650 Tablet",
  "url": "https://www.1mg.com/drugs/acmemol-650-tablet-123456",
  "productType": "medicine",
  "brand": "Acmemol",
  "manufacturer": "Acme Labs Ltd",
  "marketer": "Acme Pharma Ltd",
  "composition": "Paracetamol (650mg)",
  "saltName": "Paracetamol",
  "strength": "650mg",
  "packSize": "strip of 15 tablets",
  "packForm": "strip",
  "unitsInPack": 15,
  "mrp": 32.5,
  "price": 28.6,
  "discountPercent": 12,
  "pricePerUnit": 1.91,
  "currency": "INR",
  "prescriptionRequired": false,
  "inStock": true,
  "discontinued": false,
  "therapeuticClass": "PAIN ANALGESICS",
  "category": "OTX Medicine",
  "productForm": "Tablet",
  "rating": null,
  "ratingCount": null,
  "reviewCount": null,
  "imageUrl": "https://example.com/image.jpg",
  "description": null,
  "uses": [],
  "sideEffects": [],
  "substitutes": [],
  "storage": null,
  "factBox": null,
  "warnings": null,
  "manufacturerAddress": null,
  "marketerAddress": null,
  "detailsIncluded": false,
  "query": "paracetamol",
  "catalogPrefix": null,
  "position": 1,
  "scrapedAt": "2026-10-10T09:30:00.000Z"
}
```

With `includeDetails` on (and always for product URLs), the detail fields are filled in, for example:

```json
{
  "uses": ["Pain relief", "Treatment of fever"],
  "sideEffects": ["Nausea", "Stomach pain"],
  "substitutes": [
    {
      "id": "654321",
      "name": "Examplemol 650 Tablet",
      "manufacturer": "Example Healthcare Ltd",
      "pricePerUnit": 1.47,
      "unit": "tablet",
      "priceComparison": "22% cheaper",
      "url": "https://www.1mg.com/drugs/examplemol-650-tablet-654321"
    }
  ],
  "storage": "Store below 25°C",
  "factBox": { "habitForming": "No", "therapeuticClass": "PAIN ANALGESICS", "actionClass": "Analgesic" },
  "warnings": { "alcohol": "...", "pregnancy": "...", "breastfeeding": "...", "food": null },
  "detailsIncluded": true
}
```

Fields are always present. A value is `null` (or an empty list) when the product genuinely does not publish it, or when full details were not requested.

### Notes

- **Pricing** is per product returned. Rows that carry the full product details are billed one extra event each, so you only pay for detail when you ask for it.
- **Index rows** carry the MRP. Turn on full product details to add the selling price and discount.
- **Currency** is always Indian rupees (INR). Prices are the national list prices shown on the storefront.
- **Position** is the rank within that source's results at the moment of the run, useful for tracking placement over time.
- **Proxy**: the default Apify Proxy keeps runs cheap. If a source is refused, the actor retries it through a residential connection in India automatically, so you do not need to change this setting.
- A source that returns nothing produces a single row with `ok: false` and a short reason, so a failure is never silent.
- **Not medical advice.** The data is published product information for research, price tracking and catalogue work. Always consult a qualified doctor or pharmacist before taking any medicine.
- To improve our actors we collect anonymized usage telemetry (run stats and input patterns). No personal account data is collected.

**Found this useful?** [Leave a quick review](https://apify.com/goat255/tata-1mg-scraper/reviews). It takes a few seconds and it genuinely helps other people find the actor.

# Actor input Schema

## `searchQueries` (type: `array`):

Medicine names, salts, brands or health products to search for. Each phrase is walked through as many result pages as your per-source limit allows. Example: paracetamol, vitamin d3, cough syrup.

## `catalogPrefixes` (type: `array`):

Walk the A to Z medicine index for each starting letter or prefix. Use a single letter such as a for a broad sweep, or a longer prefix such as amox to narrow it. Index rows carry the MRP; turn on full product details to add the selling price, discount and medical information.

## `productUrls` (type: `array`):

Medicine or health product page links. Each one returns a single, fully detailed product record. Example: https://www.1mg.com/drugs/example-500mg-tablet-123456.

## `maxItemsPerSource` (type: `integer`):

Cap on products returned for each search phrase or index prefix. Search pages are walked about 40 products at a time and index pages 30 at a time, until this is reached or the source runs out. Product URLs always return one record each.

## `sort` (type: `string`):

Ordering applied to search phrases. Relevance is the storefront's own default ranking. Does not apply to the medicine index or product URLs.

## `includeDetails` (type: `boolean`):

Open each product's page to add the full composition, uses, side effects, substitutes with their prices, storage, safety warnings, manufacturer and marketer addresses, ratings and the live price and discount. Slower, and billed as an extra event per product. Product URLs always include details.

## `concurrency` (type: `integer`):

How many sources to process in parallel. Higher is faster but puts more load on the proxy.

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

Apify Proxy is the default and works for most runs. If a source is refused, the actor switches that source to a residential connection in India on its own. Pick residential here to use it from the start.

## Actor input object example

```json
{
  "searchQueries": [
    "paracetamol"
  ],
  "catalogPrefixes": [],
  "productUrls": [],
  "maxItemsPerSource": 20,
  "sort": "relevance",
  "includeDetails": false,
  "concurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `products` (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 = {
    "searchQueries": [
        "paracetamol"
    ],
    "maxItemsPerSource": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("goat255/tata-1mg-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 = {
    "searchQueries": ["paracetamol"],
    "maxItemsPerSource": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("goat255/tata-1mg-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 '{
  "searchQueries": [
    "paracetamol"
  ],
  "maxItemsPerSource": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call goat255/tata-1mg-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,goat255/tata-1mg-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/dzTaO7bhlAGsNXfCA/builds/rvc8Ou8c5sBMfSkeP/openapi.json
