# Drogasil Scraper (`automation-lab/drogasil-scraper`) Actor

Scrape Drogasil product prices, promotions, availability, categories, images, and URLs from Brazil pharmacy search and category pages.

- **URL**: https://apify.com/automation-lab/drogasil-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Drogasil Scraper

Extract product listings, prices, promotions, stock signals, and catalog metadata from Drogasil, one of Brazil's largest online pharmacy stores.

Use this actor when you need structured pharmacy ecommerce data without maintaining your own scraper, retry logic, or price-enrichment code.

### What does Drogasil Scraper do?

Drogasil Scraper collects product data from `drogasil.com.br` search and category pages.

It reads the server-rendered storefront data and enriches each product with live pricing and stock information from Drogasil's public storefront API.

Typical results include product name, SKU, brand, current price, list price, discount, category path, image URL, product URL, availability, and promotion details.

### Who is it for?

Pricing analysts use it to track pharmacy product prices across Brazilian ecommerce.

Retail intelligence teams use it to monitor promotions, assortment, and stock changes.

Brands and distributors use it to check whether their products are listed, discounted, or out of stock.

Marketplace operators use it to benchmark category coverage and price positioning.

### Why use this actor?

Drogasil pages contain product data in a Next.js payload and live price data in a separate GraphQL call.

This actor combines both sources into one clean dataset.

You can start with a search term like `vitamina`, `protetor solar`, or `fralda`, or provide exact Drogasil category/search URLs.

### What data can you extract?

The actor returns one row per product.

| Field | Description |
| --- | --- |
| `sku` | Drogasil product SKU |
| `name` | Product name |
| `brand` | Product brand when available |
| `currentPrice` | Current live selling price |
| `listPrice` | Original/list price |
| `discountPercentage` | Discount percentage from live pricing |
| `priceType` | Drogasil price type such as NORMAL, OFFER, or LMPM |
| `lmpmPrice` | Multi-buy promotional unit price when available |
| `lmpmQuantity` | Multi-buy quantity threshold when available |
| `inStock` | Boolean stock signal |
| `stockQuantity` | Stock quantity signal exposed by the storefront |
| `categoryPath` | Hierarchical category breadcrumb |
| `productUrl` | Absolute product URL |
| `imageUrl` | Product image URL |
| `scrapedAt` | ISO timestamp for the scrape |

### How much does it cost to scrape Drogasil products?

This actor uses pay-per-event pricing.

You pay a small start fee for each run and a per-product fee for results that are successfully extracted.

The input prefill is intentionally small so your first run is quick and inexpensive.

For larger price-monitoring jobs, increase `maxResults` after validating that the output matches your use case.

### How to scrape Drogasil search results

1. Open the actor on Apify.
2. Enter one or more search terms in **Search terms**.
3. Keep `maxResults` low for the first test.
4. Run the actor.
5. Download results as JSON, CSV, Excel, XML, or via API.

### How to scrape Drogasil category URLs

Paste Drogasil search or category URLs into **Drogasil start URLs**.

The actor normalizes relative product URLs and paginates pages where possible.

You can combine start URLs with search terms in the same run.

### Input example

```json
{
  "searchQueries": ["vitamina", "protetor solar"],
  "startUrls": [],
  "maxResults": 50,
  "includeLivePricing": true,
  "maxRequestRetries": 3
}
````

### Output example

```json
{
  "searchTerm": "vitamina",
  "sourceUrl": "https://www.drogasil.com.br/search?w=vitamina",
  "position": 1,
  "sku": "6486",
  "name": "Polivitamínico Medley Baristar 100 cápsulas",
  "brand": "Baristar",
  "currentPrice": 171.99,
  "listPrice": 202.86,
  "discountPercentage": 15.22,
  "priceType": "OFFER",
  "inStock": true,
  "stockQuantity": 1,
  "productUrl": "https://www.drogasil.com.br/baristar-100-capsulas.html?origin=search",
  "scrapedAt": "2026-05-17T08:00:00.000Z"
}
```

### Tips for best results

Use Portuguese product terms because Drogasil's storefront is optimized for Brazilian shoppers.

Use specific keywords for narrower output, such as `vitamina c efervescente` instead of only `vitamina`.

Use multiple smaller scheduled runs if you monitor many categories.

Keep `includeLivePricing` enabled when you need price, discount, or stock fields.

Disable `includeLivePricing` only if you only need catalog metadata and want the fastest possible run.

### Scheduling price monitoring

You can schedule this actor to run daily or hourly from Apify.

A common workflow is to run the same product keywords every day and compare `currentPrice`, `listPrice`, `discountPercentage`, and `inStock` over time.

Export the dataset to Google Sheets, BigQuery, Snowflake, or your internal BI tool.

### Integrations

Use Apify integrations to send Drogasil data to:

- Google Sheets for category managers.
- Slack alerts for price drops or stockouts.
- Webhooks for internal pricing pipelines.
- BigQuery or Snowflake for long-term price history.
- Make or Zapier for no-code automations.

### API usage with Node.js

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/drogasil-scraper').call({
  searchQueries: ['vitamina'],
  maxResults: 20,
  includeLivePricing: true
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### API usage with Python

```python
from apify_client import ApifyClient
import os

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/drogasil-scraper').call(run_input={
    'searchQueries': ['protetor solar'],
    'maxResults': 20,
    'includeLivePricing': True,
})

items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### API usage with cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~drogasil-scraper/runs?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"searchQueries":["vitamina"],"maxResults":20,"includeLivePricing":true}'
```

### MCP usage

Use this actor through the Apify MCP server in Claude Desktop, Claude Code, or other MCP-compatible clients.

MCP URL:

```text
https://mcp.apify.com/?tools=automation-lab/drogasil-scraper
```

Claude Code setup:

```bash
claude mcp add apify-drogasil "https://mcp.apify.com/?tools=automation-lab/drogasil-scraper"
```

Claude Desktop JSON config:

```json
{
  "mcpServers": {
    "apify-drogasil": {
      "url": "https://mcp.apify.com/?tools=automation-lab/drogasil-scraper"
    }
  }
}
```

Example prompts:

- "Run Drogasil Scraper for vitamina and summarize the cheapest products."
- "Compare current prices for protetor solar products from the latest Drogasil dataset."
- "Find products where the list price is higher than the current price."

### Data quality notes

Prices and stock are live storefront signals and may vary by location, availability, account state, or Drogasil's own pricing rules.

The actor records the values exposed to the public storefront at scrape time.

Always use `scrapedAt` when building time-series comparisons.

### Limits and pagination

`maxResults` is a global cap across all search terms and URLs.

The actor deduplicates products by SKU so the same product is not emitted twice in one run.

If Drogasil returns fewer products than requested for a narrow query, the dataset will contain fewer rows.

### Legality: is it legal to scrape Drogasil?

This actor extracts publicly available product information.

You should use the data responsibly, respect applicable laws, and avoid collecting personal data.

If you are unsure whether your use case is allowed, consult your legal advisor.

### FAQ

#### Why are some price fields empty?

Drogasil may not return a live price for every SKU. Keep `includeLivePricing` enabled and retry later if a product is temporarily missing live pricing.

#### Why did I get fewer products than requested?

The keyword or category may have fewer unique products than `maxResults`, or Drogasil may return duplicate SKUs across pages.

#### Can I scrape product detail pages?

This version focuses on search and category listings plus live price enrichment. Detail-page-specific attributes can be added in a future version if needed.

#### Can I use this for stock monitoring?

Yes. Use `inStock`, `stockQuantity`, `sku`, and `scrapedAt` to build recurring stock checks.

### Related scrapers

Other ecommerce and retail actors from Automation Lab:

- https://apify.com/automation-lab/amazon-scraper
- https://apify.com/automation-lab/mercado-livre-scraper
- https://apify.com/automation-lab/ifood-scraper
- https://apify.com/automation-lab/google-shopping-scraper

### Support

If a Drogasil page changes or a field stops appearing, open an issue on Apify with your run URL and input.

Include the keyword or category URL you used so the problem can be reproduced quickly.

# Actor input Schema

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

Drogasil keywords to search for, such as vitamina, protetor solar, fralda, or dorflex.

## `startUrls` (type: `array`):

Optional Drogasil search or category URLs. Use this when you already have the exact page you want to monitor.

## `maxResults` (type: `integer`):

Maximum number of unique Drogasil products to return across all search terms and URLs.

## `includeLivePricing` (type: `boolean`):

Fetch current price, discount, LMPM promotion, and stock quantity from Drogasil's public product API.

## `maxRequestRetries` (type: `integer`):

Retry count for temporary Drogasil page or API failures.

## Actor input object example

```json
{
  "searchQueries": [
    "vitamina"
  ],
  "startUrls": [],
  "maxResults": 20,
  "includeLivePricing": true,
  "maxRequestRetries": 3
}
```

# Actor output Schema

## `overview` (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": [
        "vitamina"
    ],
    "startUrls": [],
    "maxResults": 20,
    "includeLivePricing": true,
    "maxRequestRetries": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/drogasil-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": ["vitamina"],
    "startUrls": [],
    "maxResults": 20,
    "includeLivePricing": True,
    "maxRequestRetries": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/drogasil-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "vitamina"
  ],
  "startUrls": [],
  "maxResults": 20,
  "includeLivePricing": true,
  "maxRequestRetries": 3
}' |
apify call automation-lab/drogasil-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/drogasil-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Drogasil Scraper",
        "description": "Scrape Drogasil product prices, promotions, availability, categories, images, and URLs from Brazil pharmacy search and category pages.",
        "version": "0.1",
        "x-build-id": "7IpyVlQyqWa4uKjSg"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~drogasil-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-drogasil-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/automation-lab~drogasil-scraper/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-drogasil-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/automation-lab~drogasil-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-drogasil-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchQueries": {
                        "title": "🔎 Search terms",
                        "type": "array",
                        "description": "Drogasil keywords to search for, such as vitamina, protetor solar, fralda, or dorflex.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "🔗 Drogasil start URLs",
                        "type": "array",
                        "description": "Optional Drogasil search or category URLs. Use this when you already have the exact page you want to monitor.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Maximum products",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of unique Drogasil products to return across all search terms and URLs.",
                        "default": 50
                    },
                    "includeLivePricing": {
                        "title": "Include live price and stock",
                        "type": "boolean",
                        "description": "Fetch current price, discount, LMPM promotion, and stock quantity from Drogasil's public product API.",
                        "default": true
                    },
                    "maxRequestRetries": {
                        "title": "Request retries",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Retry count for temporary Drogasil page or API failures.",
                        "default": 3
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
