ParseForge Scrapers

CNES Brazil Health Establishments Scraper

parseforge/cnes-brazil-health-establishments-scraper

AutomationIntegrations

Scrapes health establishment records from CNES, Brazil's national registry. Filter by state, city, or name and export to CSV, JSON, Excel, or XML.

Run this scraper See the API call
Total users
2
Monthly active
1
Total runs
94
Bookmarked
0
Rating
Not rated yet
Last modified
8 days ago

Overview

ParseForge

CNES Brazil Health Establishments Scraper

Scrape Brazilian health establishments from CNES, the national registry, by state, city, or name, up to a million per run. Each record includes the establishment's CNES code, type, address, and contact details. No login or API key. Export to CSV, JSON, Excel, or XML.

CNES, the Cadastro Nacional de Estabelecimentos de Saúde, is Brazil's official registry of every public and private health facility, from hospitals to clinics. The official DATASUS portal is built for manual lookups, not bulk data collection. This Actor reads the public CNES search directly, filters by state, city, or establishment name, and returns each match in one fixed schema.

Who uses it What they scrape CNES Brazil for
Market researchers Mapping the distribution of clinics and hospitals across Brazilian states
Healthcare analysts Building a current list of facilities for service planning
Pharma sales teams Identifying target establishments by specialty and location
Public health researchers Studying healthcare access and facility density

What it does

This Actor collects health establishment records from CNES by state, city, or name, and returns each one as a flat row.

  • 📍 Geographic filters: narrow by state (UF) or a specific city using its IBGE code.
  • 🔍 Name search: filter establishments by name or search term.
  • ⚙️ Flexible limits: set a maximum number of establishments per run, from 1 to 1,000,000.
  • 📦 Structured output: each record is returned as a flat row with consistent fields.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with CNES Brazil data

📊 Market analysis.

A market researcher runs the Actor for all states to map the density of private clinics and identify underserved regions.

🏥 Healthcare planning.

A public health analyst collects all hospitals in a state to assess bed capacity and service gaps.

💊 Pharma targeting.

A sales team filters by city and establishment type to build a list of potential prescribers.

🔬 Academic research.

A researcher gathers a nationwide dataset of health facilities to study access disparities.

Why choose this scraper

What you get
Official data Directly from CNES, the national health establishment registry
No API key Uses the public search interface, no registration required
Scalable Collect up to a million records per run
Flexible filters Target by state, city, or name

How it compares

No other Store actor targets CNES Brazil the same way, so the honest comparison is with the alternatives teams actually weigh.

CNES Brazil Health Establishments Scraper Build it in-house By hand
Setup Run it now, zero config Days of engineering None, but hours per pull
When CNES Brazil changes Maintained for you You fix it You re-learn the page
Proxies, retries, anti-bot Built in Your problem Browser only
Output Fixed JSON schema, CSV/Excel export Whatever you build Copy-paste
Cost Pay per result Engineering time Analyst hours

Configure the run

Drive the Actor from state, city, and establishment name, alone or together, and filters run as each record is read so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

{
 "maxItems": 10
}

A larger pull:

{
 "maxItems": 200
}

Pricing

Pay-per-result: $0.0085 per result collected. You pay only for the results written to your dataset.

Results collected Approximate cost
100 results $0.85
1,000 results $8.50
10,000 results $85.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the CNES Brazil Health Establishments Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to CNES Brazil through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/cnes-brazil-health-establishments-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

Check your filters. If you set a state or city, ensure the codes are correct. Also verify the search term if used. Try broadening your filters.

The run is taking too long.

Reduce the maximum establishments or narrow your filters to a specific state or city.

Some records are missing fields.

CNES may not have complete data for every establishment. Missing fields will be empty in the output.

I get an error about the city code.

The city input expects a 6-digit IBGE municipal code. You can find the code on the IBGE website or by searching for the city name plus 'IBGE code'.

FAQ

Question Answer
What is CNES? CNES is the Cadastro Nacional de Estabelecimentos de Saúde, Brazil's official registry of all health establishments, maintained by the Ministry of Health through DATASUS.
Do I need an API key or login? No. This Actor uses the public CNES search interface, so no registration or credentials are required.
Can I filter by state? Yes. Use the state input with the two-letter UF code, such as SP for São Paulo or RJ for Rio de Janeiro.
Can I filter by city? Yes. Provide the 6-digit IBGE municipal code for the city, for example 355030 for São Paulo.
Can I search by establishment name? Yes. Use the search input to filter establishments by name or a partial term.
How many records can I collect? You can set the maximum establishments per run from 1 to 1,000,000.
What data fields are returned? Each record includes the CNES code, establishment name, type, address, contact details, and other registry fields. The exact fields are shown in the sample output.
What export formats are supported? You can export the results to CSV, JSON, Excel, or XML.
Is the data up to date? The Actor reads directly from the live CNES database, so the data reflects the current registry at the time of the run.
Can I run this for the whole country? Yes. Leave the state and city inputs empty to collect establishments nationwide, subject to the maximum items limit.

Related actors

Browse the full ParseForge collection for more scrapers.

🆘 Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Ministério da Saúde, DATASUS. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

Input

FieldTypeWhat it doesDefault
state string (28 options) Two-letter Brazilian state code (e.g. SP, RJ, MG). Leave empty for nationwide. not set
city string 6-digit IBGE municipal code (e.g. 355030 for São Paulo). Optional. not set
search string Filter establishments by name (optional). not set
maxItems integer How many health establishments to collect per run. 10

Pricing

from $7.50 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.0075 to $0.0085

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST · run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~cnes-brazil-health-establishments-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run CNES Brazil Health Establishments Scraper on Apify All scrapers