# Correios Tracking Scraper: Brazil Post Package Status (`scrapewise/correios-tracking-scraper`) Actor

Scrape Correios (Brazil Post) package tracking in bulk: status, date, city and state of the latest event, delivered flag, service (SEDEX, PAC), expected delivery, late flag, pickup deadline and the full event history for up to 2,000 codes per run. Codes without events are free.

- **URL**: https://apify.com/scrapewise/correios-tracking-scraper.md
- **Developed by:** [Scrapewise Data](https://apify.com/scrapewise) (community)
- **Categories:** Automation, E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.04 / 1,000 package trackeds

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/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

## Correios Tracking Scraper: Brazil Post package status in bulk

Track **Correios (Brazil Post)** packages in bulk. Paste a list of tracking codes and get one clean row per code: the latest event with its date, city and state, whether the package was delivered, the service (SEDEX, PAC and others), the expected delivery date, the late flag, the pickup deadline when a package waits at an agency, and the full event history that Correios shows.

No Correios account, contract or API key needed. It is used to:

- **watch every open order in one place**: schedule it every few hours with `onlyNew` and get the full record only when a package moves;
- feed e-commerce back offices, ERPs, spreadsheets and customer portals with delivery status for Brazilian orders;
- find late, returned or waiting-for-pickup packages in a backlog without opening the Correios website code by code;
- follow international parcels (AliExpress, Shopee, Shein and other marketplaces) once they reach Brazil and get a Correios code.

### At a glance

| What | Price |
|---|---|
| Package tracked (a code that Correios answered with events) | **US$ 4.00 per 1,000** (US$ 0.004 each) |
| Lookup session (once per run that looks codes up) | US$ 0.03 per run |
| Run start | US$ 0.005 per GB of memory (US$ 0.01 with the default 2 GB) |

- 200 open orders checked twice a day for 30 days = 12,000 checks = **US$ 48** in checks, plus US$ 0.04 per run (60 runs = US$ 2.40).
- A code without events yet, an invalid code, a refused lookup or a code the run did not reach is **never charged**; you get a row with `errorCode` that says why.
- With `onlyNew`, an unchanged package is still one check (Correios was asked), but it comes back as a short `unchanged` row so your integration only reacts to real changes.
- `maxItems` caps the charged codes per run, and a spending limit on the run stops it cleanly with everything delivered so far. Proxy traffic is included in the price.
- Codes are looked up in groups, so one run with 100 codes costs far less per code than 100 runs with one code each. Send your whole list in one run.

### Quick start

```json
{
  "trackingCodes": ["AA123456789BR"]
}
```

A monitoring setup for a store, run every 4 hours from a schedule:

```json
{
  "trackingCodes": ["AA123456789BR"],
  "onlyNew": true,
  "maxItems": 2000
}
```

Codes can be pasted with spaces or dashes (`AA 123 456 789 BR`); they are cleaned and duplicates are removed.

### Which codes work

Any Correios object code: **2 letters, 9 digits and 2 letters**, usually ending in `BR`. That covers:

- SEDEX, SEDEX 10, SEDEX 12, PAC, Mini Envios and registered letters posted in Brazil;
- logical labels created by stores and marketplaces before posting;
- international parcels handed to Correios when they enter Brazil (codes such as `NL...BR`, `LP...`, `NN...BR`, `UB...`).

A code shows events only after Correios scans the package. A label that was created but not posted, or a parcel that is still abroad, comes back as a free `NOT_FOUND` row: run it again later.

### Input

| Field | Type | What it does |
|---|---|---|
| `trackingCodes` | list of text | One code per line. Up to 2,000 per run. Also accepted as `codes`, `trackingNumbers` or `objects`. |
| `onlyNew` | yes/no | For schedules. A code whose latest event is the same as in your previous run comes back as a short `unchanged` row. |
| `maxItems` | number | Cap on codes tracked (charged) in this run. 0 = no cap. Default 50: raise it for larger lists. |
| `proxyConfiguration` | proxy | Residential proxy in Brazil by default, included in the price. Keep the default. |

### Output

One row per code. Main fields:

| Field | Example | Meaning |
|---|---|---|
| `trackingCode` | `AA123456789BR` | The code, cleaned. |
| `found` | `true` | Correios has events for it. |
| `statusGroup` | `in_transit` | `in_transit` or `delivered`, as Correios groups it. |
| `status` | `Saída para entrega cancelada` | Latest event, in Portuguese as Correios writes it. |
| `statusDetail` | `Será efetuada nova saída para entrega` | Extra line Correios adds to the event, when there is one. |
| `statusDate` | `2026-10-16T18:00:55-03:00` | Date and time of the latest event (Brasília time). |
| `statusCity`, `statusState` | `Fortaleza`, `CE` | Where the latest event happened. |
| `delivered` | `false` | Whether the package was delivered. |
| `deliveredAt` | `null` | Delivery date and time, when delivered. |
| `serviceCategory` | `SEDEX` | Service family (SEDEX, PAC, international...). |
| `serviceName` | `ETIQUETA LOGICA SEDEX` | Service name as Correios shows it. |
| `expectedDelivery` | `null` | Expected delivery date, when Correios shows one. |
| `isLate` | `true` | Correios marks the package as late. |
| `pickupDeadline` | `null` | Last day to pick up a package waiting at an agency or locker. |
| `awaitingPickup` | `false` | The latest event says the package waits for pickup. |
| `lockerDelivery` | `false` | Sent to a parcel locker. |
| `importChargesDue` | `false` | International parcel with import charges to pay. |
| `heldByCorreios` | `false` | Correios flags the object as held. |
| `firstEventDate` | `2026-10-16T09:49:05-03:00` | First event Correios shows (usually the posting). |
| `eventCount` | `2` | Number of events. |
| `events` | list | Full history, newest first (see below). |
| `trackingUrl` | link | Correios tracking page for the code. |
| `changed` | `true` | Only with `onlyNew`: whether something changed since your previous run. |
| `scrapedAt` | `2026-11-18T18:33:20Z` | When the row was produced. |

Each item of `events` has `date`, `code`, `typeCode`, `description`, `shortDescription`, `detail`, `unitType` (agency, distribution unit, sorting center...), `unitName`, `city`, `state`, `country`, `destinationUnitType`, `destinationCity`, `destinationState` (for transfers between units), `pickupDeadline` and `isFinal`.

The dataset has two views: **Packages** (one line per code) and **Event history** (one line per event, ready for spreadsheets).

#### Example row

From a real run on 18 Nov 2026:

```json
{
  "type": "tracking",
  "trackingCode": "AA123456789BR",
  "found": true,
  "statusGroup": "in_transit",
  "status": "Saída para entrega cancelada",
  "statusDetail": "Será efetuada nova saída para entrega",
  "statusDate": "2026-10-16T18:00:55-03:00",
  "statusCity": "Fortaleza",
  "statusState": "CE",
  "delivered": false,
  "deliveredAt": null,
  "serviceCategory": "SEDEX",
  "serviceName": "ETIQUETA LOGICA SEDEX",
  "expectedDelivery": null,
  "isLate": true,
  "pickupDeadline": null,
  "awaitingPickup": false,
  "lockerDelivery": false,
  "importChargesDue": false,
  "heldByCorreios": false,
  "firstEventDate": "2026-10-16T09:49:05-03:00",
  "eventCount": 2,
  "events": [
    {
      "date": "2026-10-16T18:00:55-03:00",
      "code": "BDE",
      "typeCode": "47",
      "description": "Saída para entrega cancelada",
      "shortDescription": "Saída cancelada",
      "detail": "Será efetuada nova saída para entrega",
      "unitType": "Unidade de Distribuição",
      "city": "Fortaleza",
      "state": "CE",
      "isFinal": false
    },
    {
      "date": "2026-10-16T09:49:05-03:00",
      "code": "OEC",
      "typeCode": "01",
      "description": "Objeto saiu para entrega ao destinatário",
      "shortDescription": "Saiu para entrega ao destinatário",
      "detail": "É preciso ter alguém no endereço para receber o carteiro",
      "unitType": "Unidade de Distribuição",
      "city": "Fortaleza",
      "state": "CE",
      "isFinal": false
    }
  ],
  "trackingUrl": "https://rastreamento.correios.com.br/app/index.php?objetos=AA123456789BR",
  "scrapedAt": "2026-11-18T18:33:20Z"
}
```

Event texts stay in Portuguese, exactly as Correios writes them, so they match what your customers see on the Correios website. Use `code` + `typeCode` when you need a stable value for rules.

### Errors you may see

Error rows are free and always carry `errorCode` and a plain-English `error`:

| `errorCode` | Meaning | What to do |
|---|---|---|
| `NOT_FOUND` | Correios has no events for the code yet. | Normal right after a label is created or while an international parcel is abroad. Run again later. |
| `INVALID_INPUT` | Not a Correios code (2 letters, 9 digits, 2 letters). | Check the code on the receipt or label. |
| `BLOCKED` | Correios did not answer after several attempts. | Run it again in a few minutes. |
| `NOT_REACHED` | The run stopped before this code (maxItems, spending limit or timeout). | Raise the limit or the timeout, or split the list. |

### Integrations, scheduling and AI agents

- **Schedules**: create a schedule in Apify Console (every 2, 4 or 12 hours) with `onlyNew: true`; rows with `changed: true` are the packages that moved.
- **Export**: download the dataset as JSON, CSV, Excel or XML, or read it from the Apify API (`/datasets/{id}/items`).
- **Make, n8n, Zapier**: use the Apify app to run the Actor and send changed packages to Google Sheets, Slack, e-mail or your store platform.
- **Webhooks**: call your endpoint when a run finishes and process only `changed` rows.
- **AI agents**: the Actor works through the Apify MCP server, so an assistant can check "where is order X" or list all late packages from a sheet.

### FAQ

**Do I need a Correios contract or login?**
No. The Actor reads the public tracking that anyone can open on the Correios website.

**How fast is it?**
Codes are looked up in groups of 20. A group usually takes 20 to 40 seconds, so 100 codes take about 2 to 3 minutes. The first group of a run also prepares the browser.

**Why is a code `NOT_FOUND` if my store already has it?**
Correios shows a code only after the first scan. Stores often create the label hours or days before posting, and international parcels get Correios events only when they arrive in Brazil.

**Is the event text translated?**
No. It stays in Portuguese, as Correios writes it. The event `code` and `typeCode` are stable and work for rules in any language.

**Can I track packages from other carriers?**
Only Correios codes. Packages handed from a marketplace carrier to Correios in Brazil work once they have a Correios code.

**How do I track only what changed?**
Turn on `onlyNew` and run the same list from a schedule. Unchanged codes come back as short `unchanged` rows; changed ones come back in full with `changed: true`.

### Limitations

- Only codes in the Correios format (2 letters, 9 digits, 2 letters).
- The history is what Correios shows publicly. Very old packages may be gone from Correios.
- Event texts are in Portuguese.
- During Correios outages or maintenance, codes come back as free `BLOCKED` rows. Run again later.

### Changelog

- **18 Nov 2026**: first release. Bulk tracking of Correios codes with status, delivery, service, expected date, late flag, pickup deadline, full history, `onlyNew` monitoring and free error rows.

# Actor input Schema

## `trackingCodes` (type: `array`):

One Correios code per line, in the format of 2 letters, 9 digits and 2 letters (for example AA123456789BR). Spaces and dashes are ignored and duplicates are removed. International parcels that arrive through Correios (AliExpress, Shopee, Shein and other marketplaces) use the same format. Up to 2,000 codes per run.

## `onlyNew` (type: `boolean`):

For schedules: a code whose latest event is the same as in your previous run comes back as a short `unchanged` row instead of the full record. Each code tracked is still one check.

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

Cap on codes tracked (charged) in this run; 0 = no cap. Codes that do not fit come back as free NOT_REACHED rows.

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

Residential proxy in Brazil is the default and is included in the price. Other settings usually get no answer from Correios.

## Actor input object example

```json
{
  "trackingCodes": [
    "AA123456789BR"
  ],
  "onlyNew": false,
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "BR"
  }
}
```

# Actor output Schema

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

No description

## `resultsCsv` (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 = {
    "trackingCodes": [
        "AA123456789BR"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "BR"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapewise/correios-tracking-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 = {
    "trackingCodes": ["AA123456789BR"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "BR",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapewise/correios-tracking-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 '{
  "trackingCodes": [
    "AA123456789BR"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "BR"
  }
}' |
apify call scrapewise/correios-tracking-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapewise/correios-tracking-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/MJNsnox2cdf5b2agF/builds/ByGQ9MVuf5RCErkLc/openapi.json
