# iFood Sellers Scraper (`national_scrim/ifood-sellers-scraper`) Actor

Lista restaurantes e lojas públicos no catálogo do iFood.

- **URL**: https://apify.com/national\_scrim/ifood-sellers-scraper.md
- **Developed by:** [Bruno-Arantir](https://apify.com/national_scrim) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.50 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## iFood Sellers Scraper

**Public iFood restaurant and merchant catalog for a city or map point.**

Mapeie o mix de lojas, notas e taxas de entrega de um bairro — catálogo público apenas, sem login e sem fluxo de pedido.

- Busca por cidade (centro geográfico embutido) ou lat/lng.
- Filtro opcional de termo e culinária.
- Campos: nome, nota, avaliações, categoria, taxa/tempo de entrega, área e URL/id.
- Tenta a API HTTP histórica `marketplace.ifood.com.br` e, se 404/challenge, o catálogo público no Playwright.
- Challenge/CAPTCHA = falha fechada. Sem colocação de pedido.

### Fonte

1. `GET https://marketplace.ifood.com.br/v1/merchants?latitude=&longitude=&channel=IFOOD` (quando ainda responder).
2. HTML público `https://www.ifood.com.br/delivery/{cidade-uf}`.

O endpoint v1 devolveu 404 neste ambiente (2026-09) e o www caiu em Cloudflare. O Actor trata isso como bloqueio, não como “zero lojas”. **Apify Console → Use Apify Proxy → RESIDENTIAL → country BR** + SessionPool. Fixtures cobrem o parser.

### Amostra de saída

Fixture ilustrativa no formato histórico do marketplace (**não é extração ao vivo desta semana**):

```json
{
  "id": "74dde208-f99c-4e06-bb90-2bbbfaffeb7e",
  "name": "Rei do Açai",
  "rating": 4.7,
  "reviewCount": 1280,
  "cuisine": "Açaí",
  "deliveryFee": 8.99,
  "deliveryTime": 35,
  "area": "Pinheiros",
  "url": "https://www.ifood.com.br/delivery/sao-paulo-sp/rei-do-acai/74dde208-f99c-4e06-bb90-2bbbfaffeb7e"
}
```

### Configuração

| Campo | Default | Descrição |
| --- | --- | --- |
| `city` | São Paulo | Capitais e grandes praças |
| `latitude` / `longitude` | centro de SP | Prioridade sobre cidade |
| `searchQuery` | — | pizza, açaí… |
| `cuisine` | — | Filtro de categoria |
| `maxItems` | 40 | Teto 5.000 |
| `useBrowser` | true | Playwright se HTTP falhar |
| `proxyConfiguration` | — | Recomendado |

### PPE

Evento `dataset-item`: **US$ 4–5 / 1.000 lojas** sugerido.

### LGPD

Dados de vitrine pública. Não coletamos contas, cartões, endereços de entrega de clientes nem histórico de pedidos.

### Desenvolvimento

```bash
cd actors/ifood-sellers-scraper
npm install && npm test && npm run build
apify run
```

# Actor input Schema

## `city` (type: `string`):

Cidade brasileira. Usamos um mapa interno de coordenadas (centro) para as capitais e grandes praças.

## `latitude` (type: `number`):

Opcional. Se informada com longitude, tem prioridade sobre a cidade.

## `longitude` (type: `number`):

Opcional. Par da latitude.

## `searchQuery` (type: `string`):

Termo público (pizza, açaí, mercado). Aplicado no catálogo quando disponível.

## `cuisine` (type: `string`):

Filtro textual sobre a categoria pública (Japonesa, Brasileira, Lanches).

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

Limite rígido (teto 5.000).

## `useBrowser` (type: `boolean`):

O marketplace muda com frequência e o HTML do www.ifood.com.br tem Cloudflare. HTTP é tentado primeiro; Playwright só abre o catálogo público. Challenge = fail closed.

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

Padrão em produção: Apify RESIDENTIAL + país BR. Console → Use Apify Proxy, grupo RESIDENTIAL, country BR.

## Actor input object example

```json
{
  "city": "São Paulo",
  "latitude": -23.561,
  "longitude": -46.656,
  "maxItems": 20,
  "useBrowser": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (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 = {
    "city": "São Paulo",
    "latitude": -23.561,
    "longitude": -46.656,
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("national_scrim/ifood-sellers-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 = {
    "city": "São Paulo",
    "latitude": -23.561,
    "longitude": -46.656,
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("national_scrim/ifood-sellers-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 '{
  "city": "São Paulo",
  "latitude": -23.561,
  "longitude": -46.656,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call national_scrim/ifood-sellers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,national_scrim/ifood-sellers-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/9z2oTRtP40b96Q3Pc/builds/hrt1pihmCkgavgvIh/openapi.json
