# Drogasil Scraper (`crawloop/drogasil-scraper`) Actor

Scrape Drogasil Brazil pharmacy search. Export price in BRL, discount, Pix price, stock, brand, and prescription flag.

- **URL**: https://apify.com/crawloop/drogasil-scraper.md
- **Developed by:** [Andrej Kiva](https://apify.com/crawloop) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 75.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 products

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## Drogasil Scraper

> **Disclaimer:** Unofficial tool — not affiliated with, sponsored by, or endorsed by Raia Drogasil S.A. or its affiliates. Data is read from publicly accessible pharmacy search results only. No login. You are responsible for complying with applicable law and the site’s terms. No warranty on accuracy or availability. Provided for informational and research use.

Drogasil Brazil pharmacy prices, discounts, Pix prices, and stock from search. This Drogasil scraper is an API alternative for price monitoring. Paste a keyword such as dipirona. Each dataset row is one product. Run it from Python, Node.js, or MCP and export JSON.

### When to use

- Snapshot Drogasil shelf prices for a medicine, vitamin, or brand
- Compare the current BRL price with the regular price, the discount, and the Pix price
- Flag prescription products and sponsored placements in a search

### Key features

- Search keywords, or a Drogasil search URL that contains `w=`
- Price, regular price, discount, Pix price, and multi-buy price in BRL
- Live stock quantity, brand, pack size, category, and prescription flag
- HTTP fetch, 256 MB, no browser

### Input

| Field | Required | Description |
| :--- | :--- | :--- |
| `queries` | Yes | Search terms such as `dipirona` |
| `maxItems` | No | Stop after this many products. Default 24, maximum 500 |
| `maxPages` | No | Pages per keyword. Default 1. Up to 48 products per page |
| `proxyConfiguration` | No | Apify Proxy. Default is Unblocker in Brazil |

#### Input example

```json
{
  "queries": ["dipirona"],
  "maxItems": 24,
  "maxPages": 1
}
```

### Output

| Field | Description |
| :--- | :--- |
| `title` | Product name |
| `brand` | Brand |
| `packSize` | Package amount from the search card |
| `price` | Current price in BRL |
| `regularPrice` | Price before the current discount |
| `discountPercent` | Discount on the live price |
| `pixPrice` | Pix price when the live price includes one |
| `multiBuyQuantity` | Units required for the multi-buy price |
| `multiBuyPrice` | Unit price when that quantity is met |
| `currency` | BRL |
| `inStock` | True when live stock is above zero |
| `stockQty` | Live stock quantity |
| `prescription` | True when the card marks a prescription product |
| `generic` | True when the card marks a generic |
| `sponsored` | True for a sponsored placement |
| `category` | Category path |
| `productUrl` | Product page URL |

#### Output example

```json
{
  "source": "drogasil.com.br",
  "productId": "331137",
  "title": "Novalgina Dipirona 1g 20 comprimidos",
  "brand": "Novalgina",
  "packSize": "20 Comprimidos",
  "price": 21.9,
  "regularPrice": 30.0,
  "discountPercent": 27,
  "pixPrice": 20.5,
  "currency": "BRL",
  "inStock": true,
  "stockQty": 4,
  "prescription": false,
  "sponsored": true,
  "category": "Medicamentos > Remédios > Para Dor e Febre",
  "productUrl": "https://www.drogasil.com.br/novalgina-1g-20-comprimidos.html",
  "query": "dipirona",
  "rank": 1
}
```

### Use cases

- **Price check** — export the current BRL price, regular price, and Pix price for one keyword
- **Assortment** — keep brand, pack size, category, and the prescription flag
- **Sponsored watch** — use `sponsored` to separate paid placements from organic cards

### Integration examples

Replace `APIFY_TOKEN` with your Apify token. The Actor name is `crawloop/drogasil-scraper`.

#### Node.js

```javascript
import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor("crawloop/drogasil-scraper").call({
  queries: ["dipirona"],
  maxItems: 24,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("crawloop/drogasil-scraper").call(run_input={
    "queries": ["dipirona"],
    "maxItems": 24,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

#### cURL

```bash
curl "https://api.apify.com/v2/acts/crawloop~drogasil-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"queries\":[\"dipirona\"],\"maxItems\":24}"
```

### MCP and AI assistants

Use this Actor from AI tools via [Apify MCP](https://docs.apify.com/platform/integrations/mcp). Connect your Apify account, then call this Actor by its Store name.

Example prompts:

- "Run Drogasil Scraper for dipirona and return title, brand, price, Pix price, and stock as JSON"
- "Scrape Drogasil search for vitamina C and list products that require a prescription"
- "Pull 24 Drogasil dipirona rows and keep only rows where the current price is below the regular price"

### FAQ

**Does this open each product page?**
No. It reads the search card and the live price for those SKUs. The barcode is not on the search card.

**What if the keyword matches nothing?**
The run finishes with an empty dataset. Other keywords in the same input still run.

**How many products are on a page?**
Up to 48. Raise `maxPages` when you need more than one page. `maxItems` caps the combined rows.

# Actor input Schema

## `queries` (type: `array`):

Pharmacy search terms, for example dipirona or a Drogasil search URL that contains w=.

## `maxItems` (type: `integer`):

Stop after this many products across all keywords.

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

Search pages to open for each keyword. A page holds up to 48 products.

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

Apify Proxy. Drogasil blocks datacenter IPs, so the default is Unblocker in Brazil.

## Actor input object example

```json
{
  "queries": [
    "dipirona"
  ],
  "maxItems": 24,
  "maxPages": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "UNBLOCKER"
    ],
    "apifyProxyCountry": "BR"
  }
}
```

# Actor output Schema

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

Default dataset items.

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

// Run the Actor and wait for it to finish
const run = await client.actor("crawloop/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 = { "queries": ["dipirona"] }

# Run the Actor and wait for it to finish
run = client.actor("crawloop/drogasil-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 '{
  "queries": [
    "dipirona"
  ]
}' |
apify call crawloop/drogasil-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawloop/drogasil-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/06a7oJ4cljHPdKAs5/builds/xM6CJKmqhG9FTPdyE/openapi.json
