# DHL Sendungsverfolgung API - Tracking, Events & Change Feed (`clearpath/dhl-sendungsverfolgung-api`) Actor

Extract DHL Sendungsverfolgung data by tracking number or customer reference: status, full event history, delivery progress and the delivery window. Reports what changed since your last run, not the same payload twice. No DHL contract or key. Export JSON, CSV, Excel.

- **URL**: https://apify.com/clearpath/dhl-sendungsverfolgung-api.md
- **Developed by:** [ClearPath](https://apify.com/clearpath) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $14.99 / 1,000 parcel updates

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?

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

## DHL Sendungsverfolgung API | Parcel Tracking, Event History & Change Feed (2026)

<blockquote style="margin:0 0 16px;border-left:5px solid #D40511;background:#FFFBEA;padding:16px 20px">
<span style="font-size:18px;font-weight:700;color:#1C1917">DHL Sendungsverfolgung as an API: 22 fields per parcel, and only what changed.</span>
</blockquote>

<a href="https://console.apify.com/actors/2jpaRDRgQ5D34osXD/input"><img src="https://api.apify.com/v2/key-value-stores/21hatybJqakfiJoxJ/records/dhl-sendungsverfolgung-api-hero.png" alt="DHL Sendungsverfolgung API: parcel status, event history, delivery window and change feed as structured JSON" style="max-width:100%"></a>

#### Copy to your AI assistant

```
clearpath/dhl-sendungsverfolgung-api on Apify. DHL Sendungsverfolgung by tracking number or customer reference and reports what changed since the last run. Call ApifyClient("TOKEN").actor("clearpath/dhl-sendungsverfolgung-api").call(run_input={...}), then client.dataset(run["defaultDatasetId"]).list_items().items. Max 1000 numbers per run; a customer reference resolves to the real number in trackingNumber. Full spec: GET https://api.apify.com/v2/acts/clearpath~dhl-sendungsverfolgung-api/builds/default (Bearer TOKEN) -> inputSchema, actorDefinition.storages.dataset, readme. Token: https://console.apify.com/account/integrations
```

### DHL Sendungsverfolgung API: what you get per parcel

Every field below comes back on every check, in German or English. 22 fields per parcel, no DHL
business contract and no developer key.

| Field | What it is |
|---|---|
| `trackingNumber` | The real DHL tracking number, even when you searched by customer reference |
| `searchedFor` | Exactly what you passed in, so rows always line up with your input |
| `status` / `statusAt` | Current status and the moment it was set |
| `progress` / `progressMax` | Step 1 to 5 of the delivery journey |
| `delivered` / `deliveredToRecipient` | Whether it arrived, and whether the recipient took it personally |
| `eta` | Delivery window: a date early on, narrowing to roughly 90 minutes on delivery day |
| `liveTrackingAvailable` | `true` while a courier is out with the parcel right now |
| `events[]` | Every scan, with timestamp, description and location |
| `flags` | Express, Päckchen, small parcel, return, retoure, international, rail, two-man handling, branch notification, pickup code |
| `sustainability` | GoGreen sender, GoGreen Plus, CO₂-free delivery, rail parcel |
| `deliveryOptionsAvailable` | Whether DHL is offering delivery options for this parcel |
| `changed` / `changeType` / `changes` | The delta since your last run |
| `found` / `notFoundReason` | Whether the number resolved, and why not if it did not |

### How to use DHL Sendungsverfolgung as an API in 4 steps

1. Open the **Input** tab of the **DHL Sendungsverfolgung API** and paste your tracking numbers, one
   per line. Customer references work too.
2. Pick a language (`de` or `en`) and leave **Only return what changed** on.
3. Click **Start**. Each parcel becomes one row in the dataset.
4. Download as **JSON, CSV, Excel or HTML**, or pull the rows straight from the
   [Apify API](https://docs.apify.com/api/v2). Then
   [schedule it](https://docs.apify.com/platform/schedules) and every later run reports only what
   moved.

### What data can you extract from DHL Sendungsverfolgung

One complete record, exactly as the Actor returns it. The `events` array is truncated below to keep
the block readable; no keys are omitted.

```json
{
  "trackingNumber": "358063591162",
  "searchedFor": "358063591162",
  "found": true,
  "status": "In Zustellung",
  "statusAt": "2026-08-25T09:24:02+02:00",
  "progress": 4,
  "progressMax": 5,
  "delivered": false,
  "deliveredToRecipient": null,
  "destinationCountry": "Deutschland",
  "direction": "ANKOMMEND",
  "productType": "PAKET",
  "flags": {
    "isReturn": false,
    "isRetoure": false,
    "isSmallParcel": false,
    "isPaeckchen": false,
    "isExpress": false,
    "isSameDay": false,
    "isRail": false,
    "isInternational": false,
    "twoManHandling": false,
    "notifiedAtBranch": false,
    "pickupCodeAvailable": false
  },
  "sustainability": {
    "co2FreeDelivery": true,
    "goGreenSender": true,
    "goGreenPlusSender": false,
    "goGreenPlusRecipient": false,
    "climateFriendlyReceipt": false,
    "railParcel": false
  },
  "eta": {
    "from": "2026-08-25T13:30:00+02:00",
    "to": "2026-08-25T15:00:00+02:00",
    "source": "planned"
  },
  "liveTrackingAvailable": true,
  "deliveryOptionsAvailable": true,
  "events": [
    {
      "at": "2026-08-23T18:03:09+02:00",
      "status": "Die Sendung wurde elektronisch angekündigt. Sobald die Sendung von uns bearbeitet wurde, erhalten Sie weitere Informationen.",
      "location": null,
      "isReturn": false
    },
    {
      "at": "2026-08-24T11:08:24+02:00",
      "status": "Die Sendung wurde vom Absender in der Filiale eingeliefert.",
      "location": null,
      "isReturn": false
    },
    {
      "...": "4 more events"
    }
  ],
  "checkedAt": "2026-08-26T06:57:48.148358+00:00",
  "changed": true,
  "changeType": "new",
  "changes": {
    "newEvents": [
      {
        "...": "6 events on first sight"
      }
    ],
    "statusChanged": null,
    "etaChanged": null,
    "justDelivered": false
  }
}
```

### DHL live tracking and the delivery window

`eta.source` tells you how firm the window is:

- `planned`: DHL's forecast. Appears once the parcel reaches the delivery base, first as a date,
  then as a time window on the morning of delivery.
- `live`: the window while a courier is actively on tour.

`liveTrackingAvailable` flips to `true` the moment a parcel is loaded onto a delivery vehicle. It is
the cheapest possible "is it out for delivery right now" signal: poll for it, then poll harder once
it turns true.

### DHL Sendungsverfolgung with a change feed: only what moved

Every parcel you check is remembered, so the next run can tell you exactly what moved.

- **`changeType: "new"`**: first time you have checked this parcel. Full record.
- **`changeType: "updated"`**: something moved. Full record plus a `changes` block.
- **`changeType: "unchanged"`**: nothing moved. A short row, billed at the lower rate.

A parcel DHL has no data for yet (`found: false`) also comes back as `unchanged` and bills at
the lower rate, on the first run as on every later one. Read `found`, not `changeType`, to tell
"nothing moved" apart from "nothing to report yet".

Here is the delta from the poll where a parcel actually landed:

```json
{
  "status": "Zustellung erfolgreich",
  "delivered": true,
  "changed": true,
  "changeType": "updated",
  "changes": {
    "newEvents": [
      {
        "at": "2026-08-25T14:46:17+02:00",
        "status": "Die Sendung wurde erfolgreich zugestellt.",
        "location": null,
        "isReturn": false
      }
    ],
    "statusChanged": {
      "from": "In Zustellung",
      "to": "Zustellung erfolgreich"
    },
    "etaChanged": {
      "from": {
        "from": "2026-08-25T13:30:00+02:00",
        "to": "2026-08-25T15:00:00+02:00"
      },
      "to": {
        "from": null,
        "to": null
      }
    },
    "justDelivered": true
  }
}
```

Leave **Only return what changed** on and a quiet run costs almost nothing. Turn it off to get the
complete record every time regardless. **Forget previous results** clears the memory for the parcels
in that run and returns full records for them. Your tracking history is stored on your own Apify
account and is never shared.

### Input

Everything is set on the **Input** tab. Four fields, nothing to configure beyond them.

```json
{
  "trackingNumbers": ["358063591162", "00340435072645002601"],
  "language": "de",
  "onlyChanges": true,
  "resetState": false
}
```

| Field | Type | Default | Notes |
|---|---|---|---|
| `trackingNumbers` | array | required | Tracking numbers or customer references, up to 1000 per run |
| `language` | string | `de` | `de` or `en`, controls the status and event wording |
| `onlyChanges` | boolean | `true` | Short row for parcels that have not moved, billed at the lower rate |
| `resetState` | boolean | `false` | Forget what was seen before and return full records for this run's parcels |

Paste a whole line of numbers if that is what you have: `"358063591162, 00340435072645002601"` is
split into two parcels automatically.

### What people use DHL Sendungsverfolgung data for

- **Ecommerce order tracking**: feed your order table's tracking numbers in, write `status` and
  `eta` back to the customer's order page.
- **Proactive delivery notifications**: watch `changes.statusChanged` and `changes.justDelivered`,
  then email or Slack the customer the moment it matters.
- **Support deflection**: answer "where is my parcel" without a human opening DHL's site.
- **Delivery-day routing**: `liveTrackingAvailable` plus the 90-minute `eta` window is enough to
  tell someone to be home.
- **Logistics reporting**: dump `events[]` for a month of parcels and measure real transit times
  per lane.
- **Returns monitoring**: `flags.isReturn` and `flags.isRetoure` separate outbound from inbound.

### Integrations and scheduling

The output is a normal Apify dataset, so it drops straight into
[Google Sheets](https://apify.com/lukaskrivka/google-sheets), Make, Zapier, Airtable, Slack, or your own
endpoint via [webhooks](https://docs.apify.com/platform/integrations/webhooks). A webhook on
`ACTOR.RUN.SUCCEEDED` gives you a push feed of parcel changes without polling anything yourself.

New to scheduling on Apify? This official walkthrough covers it in three minutes:

https://www.youtube.com/watch?v=1jI7WcVQmwM

**Recommended frequency:**

| Parcel state | How often |
|---|---|
| In transit (`progress` 1 to 3) | Twice a day |
| At the delivery base (`progress` 3 to 4) | Every 2 hours |
| `liveTrackingAvailable: true` | Every 15 to 30 minutes |
| `delivered: true` | Stop. Nothing changes after this |

With **Only return what changed** on, checking often stays cheap: only the runs that actually find
something bill at the update rate.

### How much does DHL Sendungsverfolgung cost via this API?

Pay per event, so you pay for answers rather than for runtime.

| Event | When | Price |
|---|---|---|
| Parcel update | The parcel is new to you, or something changed | $0.0199 |
| Parcel checked, no change | The parcel had not moved, or no data is available for that number | $0.0049 |
| Run start | Once per run, whether it checks 1 parcel or 1,000 | $0.009 |

Tracking one parcel from label to doorstep at three checks a day works out at roughly **$0.20**.
Two things keep that low as you scale: an unchanged check costs a quarter of an update, and the run
start is charged once per run, so checking 100 parcels in one run costs the same start as checking
one.

<blockquote style="border-left:4px solid #FFCC00;padding-left:14px;margin:12px 0">
<strong>Free tier:</strong> check one parcel per run, up to 50 checks in total.
<a href="https://console.apify.com/billing/subscription">Upgrade your Apify plan</a> to lift the limit.
</blockquote>

### Is it legal to track DHL parcels this way?

Yes, with the usual caveats. This Actor reads the same publicly available tracking information that
anyone can look up on DHL's own tracking page with a tracking number, and nothing more. It returns
**no personal data**: no sender name, no recipient name, no address. DHL reveals those only to
someone who can supply the recipient's postal code, and this Actor never asks you for one, so
there is no personal data in the output to fall under GDPR.

Tracking numbers you feed in may themselves be linked to a customer in your own systems. Treat that
input, and any dataset you build from it, under your own GDPR obligations: have a lawful basis,
keep it only as long as you need it, and do not publish it. If you are unsure how the rules apply
to your case, take legal advice.

### FAQ

**Is there a DHL tracking API I can use without an account?**
This one. You do not need a DHL business contract, a developer key, or API credentials. Pass a
tracking number and get structured JSON back.

**Does DHL have an official API, and why use this instead?**
DHL does publish developer APIs, but they are gated behind a business account and an approval
process, are scoped per product line, and rate-limit by contract. This Actor needs no contract, no
approval and no key, covers ordinary consumer parcels, and adds the change feed that the official
endpoints do not provide.

**How do I track multiple parcels at once?**
Put up to 1000 tracking numbers in `trackingNumbers`. They are resolved in parallel and each one
gets its own row.

**Does it work with customer references?**
Yes. Pass the reference and the real tracking number comes back in `trackingNumber`, with your
input echoed in `searchedFor`.

**Which parcels are covered?**
Parcels handled by DHL in Germany, inbound and outbound, including Päckchen, returns, express and
rail parcels.

**Why does a number come back with `found: false`?**
Either the number is not a DHL parcel number at all (`notFoundReason: "notADhlParcel"`) or DHL has
no data for it yet (`noDataYet`). A freshly created label often takes a few hours to appear.
Either way the row is billed at the lower `shipment-checked` rate, so polling a label that has not
been scanned yet stays cheap.

**Does it include the sender's or recipient's name?**
No. DHL only reveals those to someone who can supply the recipient's postal code, and this Actor
does not ask you for one.

**Wie funktioniert die Sendungsverfolgung hier?**
Genau wie auf dhl.de, nur als JSON: Sendungsnummer rein, Status, Verlauf, Fortschritt und
Zustellzeitfenster raus, plus die Angabe, was sich seit dem letzten Lauf geändert hat.

**How long is tracking history kept?**
Your per-parcel history is kept for 30 days on your own account, then pruned automatically.

**How do I get the data out?**
Download the dataset as JSON, CSV, Excel or HTML from the **Storage** tab, pull it from the
[Apify API](https://docs.apify.com/api/v2), or push it anywhere with an
[integration](https://docs.apify.com/platform/integrations).

**Something looks wrong. Where do I report it?**
Open the **Issues** tab on this Actor's page. Bug reports with the tracking number and the run ID
get fixed fastest.

**Can I get a custom version?**
Yes. Use the Issues tab to describe what you need, whether that is another carrier, a different
output shape, or a push integration into your own stack.

### More clearpath Actors

**🛒 Ecommerce & product data**

- <img src="https://images.apifyusercontent.com/D0laLb-81HB-Q_xLFlHYVr5xnTV6zebACb_qNg4skco/rs:fill:76:76/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vRFN2TUNBd3N1Zk15WmVMeXQtYWN0b3ItbklDZFlzNkN1RGdDSTZDdVYtS3k3UzNwWXJ6cC1zaG9weS1ieS1zaG9waWZ5LXNjcmFwZXItbG9nby5qcGc.webp" width="16" height="16" style="vertical-align:middle;border-radius:3px"> [Shopify Product Search](https://apify.com/clearpath/shop-by-shopify-product-scraper)
- <img src="https://images.apifyusercontent.com/Qo5XpnAhFQazx3aRnbI_btv3K19vudGHlGMUC3dyb9A/rs:fill:76:76/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vRFN2TUNBd3N1Zk15WmVMeXQtYWN0b3ItUjlTTDJQUGRoZGhMUXdkY2stdGJhcTRKOHN4WC1zaG9weS1ieS1zaG9waWZ5LXNjcmFwZXItbG9nby5qcGc.webp" width="16" height="16" style="vertical-align:middle;border-radius:3px"> [Shopify Store Leads Scraper](https://apify.com/clearpath/shopify-store-leads)
- <img src="https://images.apifyusercontent.com/z7LzgKh3NGd74rbrzzwUBH4wMMflO5AkrpwCWdBpZQQ/rs:fill:76:76/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vRFN2TUNBd3N1Zk15WmVMeXQtYWN0b3ItUDVmQUx0OHZZN3hYZ0poNTYtY0lQTzczeU9oSS1zaGVpbi1wcm9kdWN0LXNjcmFwZXItbG9nby5qcGc.webp" width="16" height="16" style="vertical-align:middle;border-radius:3px"> [Shein Product Scraper](https://apify.com/clearpath/shein-product-scraper)

**📬 Reaching the customer about a delivery**

- <img src="https://images.apifyusercontent.com/r0W9UIQl0v28Y4nhh6O0PjdZSpsdrcE3F2dIvUdpghE/rs:fill:76:76/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vRFN2TUNBd3N1Zk15WmVMeXQtYWN0b3ItZVdUOGN6YjRrVDNnSDFPV3QtVGJmR0Z5YTJoRS1kZmRzZmRzZmRzZC5wbmc.webp" width="16" height="16" style="vertical-align:middle;border-radius:3px"> [Email Finder & Verifier](https://apify.com/clearpath/email-finder-api)
- <img src="https://images.apifyusercontent.com/2fYik1S-7G3LivIiHnId4oIwBvO-ARNdVgJY9qWCcGA/rs:fill:76:76/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vRFN2TUNBd3N1Zk15WmVMeXQtYWN0b3ItUGZWcmFoMnpMUU5QZFJtbjAtZTRmTHZnU2pkcS1lbWFpbC12YWxpZGF0aW9uLWFwaS1hY3Rvci5wbmc.webp" width="16" height="16" style="vertical-align:middle;border-radius:3px"> [Email List Validator & Cleaner](https://apify.com/clearpath/email-validation-api)
- <img src="https://images.apifyusercontent.com/rmghSH3VPokbSyJuOevWfTJLm7sSjgo4vLdxK-yOLvw/rs:fill:76:76/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vRFN2TUNBd3N1Zk15WmVMeXQtYWN0b3ItNVZSZDB5RGpGRzZPY3NvZ2EtRkw3Z1RHYTBRdS13aGF0c2FwcC1tZXNzYWdlLWV4cG9ydC1hcGktbG9nby5wbmc.webp" width="16" height="16" style="vertical-align:middle;border-radius:3px"> [WhatsApp Number Validator](https://apify.com/clearpath/whatsapp-phone-number-validator-api)
- <img src="https://images.apifyusercontent.com/csRAqcDWzgfi4Xl-Uws5HsvxkJvO1tFtYRI5gSrN6hc/rs:fill:76:76/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vRFN2TUNBd3N1Zk15WmVMeXQtYWN0b3ItUUdvTXRmRVgwd0pCUjNPNUQtNzVrMlBkdGdtcC1waG9uZS1hY3RpdmUtY2hlY2tlci1sb2dvLnBuZw.webp" width="16" height="16" style="vertical-align:middle;border-radius:3px"> [Phone Number Active Checker](https://apify.com/clearpath/phone-number-active-checker)

**🇩🇪 More German market data**

- <img src="https://images.apifyusercontent.com/Sg5_wVcgLqaiQhiQJrTryfo4UzrKChHi-HzjY4bwihQ/rs:fill:76:76/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vRFN2TUNBd3N1Zk15WmVMeXQtYWN0b3ItczYwOWR5QUpTcmp1NTRRU2gtemo1TmVaVHlrYi1JbW1vU2NvdXQyNC1jYW52YTIucG5n.webp" width="16" height="16" style="vertical-align:middle;border-radius:3px"> [ImmoScout24 Scraper Pro](https://apify.com/clearpath/immoscout24-api-pro)
- <img src="https://images.apifyusercontent.com/rntNyV1fMhIndLFQOKeuIrnoS4Kaowp-xPjRgtONPbM/rs:fill:76:76/cb:1/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vRFN2TUNBd3N1Zk15WmVMeXQtYWN0b3ItcmZVRmRiMGh1dzg4TUlVMWstaDM1UVJUYTBrNC1pbW1vYmlsaWVuLWV4cG9ydC1wcm8tbG9nbzIucG5n.webp" width="16" height="16" style="vertical-align:middle;border-radius:3px"> [Immobilien Export Pro](https://apify.com/clearpath/immobilien-export-pro)

***

*DHL Sendungsverfolgung as an API: track German DHL parcels by tracking number or customer reference and
get status, full event history, delivery progress, delivery window and a change feed as structured
JSON, CSV or Excel.*

# Actor input Schema

## `trackingNumbers` (type: `array`):

One DHL tracking number per line. A <b>customer reference</b> works too and resolves to the real tracking number in the output. Up to <code>1000</code> per run.

## `language` (type: `string`):

Language of the status texts and event descriptions.

## `onlyChanges` (type: `boolean`):

When enabled, a parcel that has not moved since your last run comes back as a short row with just its status, and is billed at the lower rate. Disable this to get the full record for every parcel on every run.

## `resetState` (type: `boolean`):

Treat every parcel as if you had never checked it before, so this run returns full records for all of them. Useful after changing what you track.

## Actor input object example

```json
{
  "trackingNumbers": [
    "358063591162"
  ],
  "language": "de",
  "onlyChanges": true,
  "resetState": false
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("clearpath/dhl-sendungsverfolgung-api").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 = { "trackingNumbers": ["358063591162"] }

# Run the Actor and wait for it to finish
run = client.actor("clearpath/dhl-sendungsverfolgung-api").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 '{
  "trackingNumbers": [
    "358063591162"
  ]
}' |
apify call clearpath/dhl-sendungsverfolgung-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,clearpath/dhl-sendungsverfolgung-api"
        }
    }
}

```

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/2jpaRDRgQ5D34osXD/builds/eOc8itkXB1in7G1bV/openapi.json
