DEV Community

Cover image for How to Scrape Reclame Aqui Reputation and Complaints with Python
ReventaData
ReventaData

Posted on Originally published at apify.com

How to Scrape Reclame Aqui Reputation and Complaints with Python

By the end of this tutorial, you will have a short Python script that turns a company name into structured Reclame Aqui data: the company's reputation badge, its score out of 10, its CNPJ, complaint and answer counts, response, resolution and "would do business again" rates, and the company's latest consumer complaints, each with title, date, status and the consumer's city and state.

Reclame Aqui (reclameaqui.com.br) is a Brazilian site where consumers post complaints about companies and companies answer them in public.

In this guide, we use Python and the Apify Actor Reclame Aqui Scraper (reventadata/reclameaqui-scraper). You will configure a search, run the Actor and read both kinds of row it saves. The rows shown below are a sample from a run of the Actor on 2026-11-18.

⏱️ Time estimate: one sitting: install one package, set one token, run three short Python blocks.


Prerequisites

To follow this tutorial, you will need:

  1. Python 3.11+ (apify-client 3.3.0 requires it).
  2. The Apify API client for Python.
  3. An Apify account and its API token, which sits on the API & Integrations page in Apify Console.

Install the client:

pip install "apify-client~=3.0"
Enter fullscreen mode Exit fullscreen mode

The code reads the token from an environment variable:

export APIFY_API_TOKEN="your_apify_token_here"
Enter fullscreen mode Exit fullscreen mode

What you'll achieve

You will get one dataset with two kinds of row, told apart by rowType:

  • company rows: companyName, companyShortname (the URL slug), cnpj, reputationStatus, finalScore, totalComplaints, totalAnswers, responseRate, solvedRate, dealAgainRate and companyUrl.
  • complaint rows: the same company fields, plus complaintTitle, complaintDescription, complaintDate, complaintStatus, complaintSolved, consumerCity, consumerState and complaintUrl.

Note: Reclame Aqui masks consumers' structured name, e-mail and address fields. The Actor keeps only the consumer's city and state.

Example use case: Suppose you compare how three fintechs handle complaints. You would put the three names in searchQueries, set mode: "COMPANIES_ONLY", and get one row per company with its badge, score and rates side by side.


Step 1: Access Reclame Aqui Scraper

Go to the Reclame Aqui Scraper page on Apify Store. The README lists every input and output field. In this tutorial we drive the Actor from Python, so everything after this step happens in code.


Step 2: Configure the companies

There are two ways to name a company:

  • searchQueries: brand names or keywords, such as nubank or magalu. Each term goes to Reclame Aqui's own company search, and up to five matching companies are kept per term. A term the search does not answer is tried as a slug instead (lowercased, spaces turned into hyphens).
  • companyShortnames: exact Reclame Aqui slugs, such as nubank or magazine-luiza, or a full company URL (https://www.reclameaqui.com.br/empresa/nubank/).

Here is the setup. It searches nubank, saves at most 10 rows in total, and at most 10 complaints per company:

import os
from apify_client import ApifyClient

# 1. Initialize ApifyClient with the token from the environment
client = ApifyClient(os.environ["APIFY_API_TOKEN"])

# 2. Define the input: one search term, at most 10 rows in total,
#    at most 10 complaints per company
run_input = {
    "searchQueries": ["nubank"],
    "mode": "ALL",
    "maxItems": 10,
    "maxComplaintsPerCompany": 10,
}
Enter fullscreen mode Exit fullscreen mode

💡 Tip: a search term can match several companies, and the Actor processes them in the order the search returns them, after any slugs you gave in companyShortnames. When you want exactly one company, give its slug in companyShortnames and set searchQueries to [].

No proxy setting is needed in run_input.


Step 3: Choose the mode and the limits

Parameter Type Default What it does
mode string ALL ALL saves company and complaint rows; COMPANIES_ONLY saves company rows; COMPLAINTS_ONLY saves complaint rows.
maxItems integer 50 Caps all saved rows, company and complaint rows together.
maxComplaintsPerCompany integer 20 Caps complaint rows per company.

Three configurations that work:

  • Reputation benchmark: three brand names in searchQueries, mode: "COMPANIES_ONLY".
  • Complaint feed for one company: companyShortnames: ["nubank"], searchQueries: [], mode: "COMPLAINTS_ONLY", maxComplaintsPerCompany: 50, maxItems: 50.
  • Both, small: the setup above.

⚠️ A mode outside the three values is refused before the run starts. To skip complaints, use COMPANIES_ONLY: a maxComplaintsPerCompany of 0 is read as unset, so the default of 20 applies.


Step 4: Run the Actor

Now start the run with client.actor("reventadata/reclameaqui-scraper").call(run_input=run_input). The call starts the Actor on Apify and waits for it to finish before returning the run:

# 3. Start the Actor run and wait for it to finish
print("Starting Reclame Aqui extraction...")
run = client.actor("reventadata/reclameaqui-scraper").call(run_input=run_input)
if run is None or run.status != "SUCCEEDED":
    status = run.status if run else "unknown"
    raise SystemExit(f"Run did not succeed (status: {status}).")

# 4. Fetch the saved rows
items = client.dataset(run.default_dataset_id).list_items().items
print(f"Retrieved {len(items)} rows.\n")
Enter fullscreen mode Exit fullscreen mode

Behind the scenes:

  • Each search term goes to Reclame Aqui's company search, which also returns the company's CNPJ.
  • For each company, the Actor reads the company page for the score, answer count and rates, and saves the company row.
  • It then walks the company's complaint list page by page until maxComplaintsPerCompany or maxItems is reached, or a page brings no new complaint. A complaint already saved is not saved twice.

Step 5: View and download results

Loop over the rows to print the parts you need:

for item in items:
    if item["rowType"] == "company":
        print(f"{item['companyName']} ({item.get('cnpj') or 'no CNPJ'})")
        print(f"  Reputation: {item.get('reputationStatus')}, score {item.get('finalScore')}")
        print(f"  Complaints: {item.get('totalComplaints')}, answered: {item.get('totalAnswers')}")
        print(f"  Solved: {item.get('solvedRate')}%, would deal again: {item.get('dealAgainRate')}%")
    else:
        print(f"  [{item.get('complaintStatus')}] {item.get('complaintTitle')}")
        print(f"    {item.get('consumerCity')}/{item.get('consumerState')}, {item.get('complaintDate')}")
    print("-" * 40)
Enter fullscreen mode Exit fullscreen mode

Here is one company row, a sample from a run of the Actor on 2026-11-18 (Nubank, 10 rows). The company row's complaint fields are null and are left out here; scrapedAt is set when the row is built:

{
    "rowType": "company",
    "companyName": "Nubank",
    "companyShortname": "nubank",
    "companyId": "88850",
    "cnpj": "18.236.120/0001-58",
    "reputationStatus": "RA1000",
    "finalScore": 7.8,
    "totalComplaints": 56845,
    "totalAnswers": 56795,
    "responseRate": 99.9,
    "solvedRate": 93.2,
    "dealAgainRate": 81.5,
    "companyUrl": "https://www.reclameaqui.com.br/empresa/nubank/",
    "scrapedAt": "2026-11-18T07:26:14.559530+00:00"
}
Enter fullscreen mode Exit fullscreen mode

And the complaint fields of a complaint row from the same run (the row also repeats the company fields above). Descriptions can contain <br/> line breaks:

{
    "rowType": "complaint",
    "complaintId": "o3g-OmSKv5ZdBddy",
    "complaintTitle": "Quero a retirada do meu nome negativado após 5 anos",
    "complaintDescription": "A dívida passou do tempo, faz mais de 5 anos e mesma ainda tá negativado pela empresa, quero retratação e que tire meu nome se não vou entrar com mediante o processo.",
    "complaintDate": "2026-11-18T03:24:53",
    "complaintStatus": "PENDING",
    "complaintSolved": false,
    "consumerCity": "Carpina",
    "consumerState": "PE",
    "complaintUrl": "https://www.reclameaqui.com.br/nubank/quero-a-retirada-do-meu-nome-negativado-apos-5-anos_o3g-OmSKv5ZdBddy/",
    "scrapedAt": "2026-11-18T07:26:19.234598+00:00"
}
Enter fullscreen mode Exit fullscreen mode

On a company row the complaint fields are null. Apify datasets export as JSON, CSV, XML, Excel, HTML table, RSS or JSONL.


Understanding your results

The fields that matter most:

  • reputationStatus: the badge, as one of RA1000, OTIMO, BOM, REGULAR, RUIM, NAO_RECOMENDADA or SEM_INDICE (no index). The sample company had RA1000.
  • finalScore: the consumer reputation score out of 10. The sample: 7.8.
  • totalComplaints and totalAnswers: complaints received and answered. The sample had 56,845 and 56,795, so 50 unanswered.
  • responseRate, solvedRate, dealAgainRate: percentages of complaints answered, of complaints resolved, and of consumers who would do business again. The sample: 99.9, 93.2 and 81.5.
  • cnpj: the Brazilian company registry number, formatted NN.NNN.NNN/NNNN-NN. It comes from the search, so a company that no search term found has cnpj: null.
  • complaintStatus and complaintSolved: the site's status (such as PENDING or ANSWERED) and whether the consumer marked the issue resolved. The sample complaint was filed on the run day and was still PENDING.
  • consumerCity and consumerState: where the consumer is, as the site shows it (Carpina, PE in the sample). Group by consumerState to see where complaints come from.

Pro tips

  1. Benchmark first, then dig. Run COMPANIES_ONLY over a list of competitors to compare badges and rates, then a complaint run for the one that stands out.
  2. Pin the company. A brand name can match up to five companies. companyShortnames with the exact slug, or the company's URL, removes the guesswork.
  3. Mind the shared cap. maxItems counts company rows and complaint rows together, so with several companies set it to at least the number of companies times (maxComplaintsPerCompany + 1).
  4. Read the text as published. complaintDescription is what the consumer published; the site sometimes edits words ([Editado pelo Reclame Aqui]). The text is free-form, so it can still contain whatever the consumer typed.
  5. Start small. Keep maxItems: 10 until your downstream code handles both row types, then raise it.
  6. Split the two row types downstream. Filter on rowType before loading: company rows fit a "companies" table keyed by companyShortname, complaint rows a "complaints" table keyed by complaintId.

Troubleshooting

  • Run FAILED with zero rows: an empty input, or (in COMPLAINTS_ONLY, or when no company resolved) a complaint page that cannot be read, ends the run FAILED. In ALL and COMPANIES_ONLY the company row is saved first, so a company with zero complaints still ends SUCCEEDED with that row. Only COMPLAINTS_ONLY can end SUCCEEDED with an empty dataset and a status message saying so.
  • A company is missing from the results: neither the search nor the company page returned data for that slug, so the Actor skipped it and logged No data for company "<slug>". If no company resolved, the run ends FAILED. Check the slug in the company's Reclame Aqui URL.
  • cnpj is null: the company came only from companyShortnames. Add its name to searchQueries too.
  • Companies you did not expect: the search matched more than one company. Use companyShortnames.
  • Fewer rows than expected: maxItems was reached first, or a company had fewer complaint pages than asked for. Read the run log from Python with client.log(run.id).get(): a page request the site refuses is logged as a warning, and a successful run logs the total rows pushed.

For help, use the Actor's Store page.


Pricing and next steps

For current pricing and details, see the Store page.

To repeat a check, save the input as a task and add an Apify schedule, which runs an Actor or task on a cron expression (0 8 * * * is every day at 8 AM). To react when a run finishes, add a webhook on ACTOR.RUN.SUCCEEDED; its payload carries the run object, including defaultDatasetId.

Which Brazilian companies are you planning to track on Reclame Aqui? Drop a comment! 💬

Top comments (0)