# FedEx API

> FedEx returns package tracking details and is available as a workflow and API.

FedEx's Track package method returns shipment status, delivery details, route, and available scan history using a tracking number.

- Page: https://fous.com/workflows/fedex
- Handle: `@fedex`
- Category: [Logistics](https://fous.com/workflows/category/logistics)
- Source website: https://fedex.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with FedEx.

## Methods

### Track package

Operation `track_package`, version 1. 1 credit per call.

Track a FedEx package by its tracking number. Returns its status, delivery details, route, and available scan history. Older shipments may have limited history; reused numbers can match multiple shipments.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `tracking_number` | string | yes | `"8807 2064 5182"` | The 12 to 22 digit number on the package label or receipt; spaces are allowed. Example: 880720645182. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "tracking_number"
  ],
  "properties": {
    "tracking_number": {
      "type": "string",
      "description": "The 12 to 22 digit number on the package label or receipt; spaces are allowed. Example: 880720645182.",
      "examples": [
        "8807 2064 5182",
        "880720645182"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "tracking_number": "8807 2064 5182"
    },
    {
      "tracking_number": "880720645182"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `status` | string | `"Delivered"` |  |
| `weight` | string or null |  |  |
| `history` | array |  |  |
| `history[].location` | string or null | `"SOUTH SAN FRANCISCO, CA"` |  |
| `history[].date_time` | string or null | `"2025-04-23T09:55:00+00:00"` |  |
| `history[].description` | string | `"Delivered"` |  |
| `left_at` | string or null |  |  |
| `signed_by` | string or null | `"R.Martinez"` |  |
| `origin_city` | string or null | `"Houston"` |  |
| `delivered_at` | string or null | `"2025-04-23T09:55:00+00:00"` |  |
| `service_type` | string or null | `"FedEx Standard Overnight"` |  |
| `tracking_link` | string | `"https://www.fedex.com/fedextrack/?trknbr=880720645182"` |  |
| `tracking_number` | string | `"880720645182"` |  |
| `destination_city` | string or null | `"South San Francisco"` |  |
| `number_of_pieces` | integer or null |  |  |
| `estimated_delivery_end` | string or null |  | End of the estimated delivery window, ISO 8601 with offset. |
| `estimated_delivery_start` | string or null |  | Estimated delivery time or start of a delivery window, ISO 8601 with offset. |

**Example input**

```json
{
  "tracking_number": "8807 2064 5182"
}
```

**Example output**

```json
{
  "status": "Delivered",
  "weight": null,
  "history": [
    {
      "location": "SOUTH SAN FRANCISCO, CA",
      "date_time": "2025-04-23T09:55:00+00:00",
      "description": "Delivered"
    }
  ],
  "left_at": null,
  "signed_by": "R.Martinez",
  "origin_city": "Houston",
  "delivered_at": "2025-04-23T09:55:00+00:00",
  "service_type": "FedEx Standard Overnight",
  "tracking_link": "https://www.fedex.com/fedextrack/?trknbr=880720645182",
  "tracking_number": "880720645182",
  "destination_city": "South San Francisco",
  "number_of_pieces": null,
  "estimated_delivery_end": null,
  "estimated_delivery_start": null
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@fedex",
  "visibility": "public",
  "operation": "track_package",
  "version": 1,
  "input": {
    "tracking_number": "8807 2064 5182"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@fedex\",\n  \"visibility\": \"public\",\n  \"operation\": \"track_package\",\n  \"version\": 1,\n  \"input\": {\n    \"tracking_number\": \"8807 2064 5182\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@fedex",
  "visibility": "public",
  "operation": "track_package",
  "version": 1,
  "input": {
    "tracking_number": "8807 2064 5182"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@fedex","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Monitor package delivery progress
- Review a shipment’s route and scan history
- Find the estimated delivery window
- Check who signed for a delivered package
- Identify shipments by origin and destination city

## FAQ

### Is Fous affiliated with FedEx?

No. Fous is not affiliated with FedEx. This workflow reads the public fedex.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a FedEx account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from fedex.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What is the status of my package?

Use Track package with the package’s tracking number to get its status and delivery details.

### Where has my package been scanned?

Track package returns available scan history, including each scan’s location, date, and description.

### When is my package expected to arrive?

Track package returns an estimated delivery time or window when available.

## Related

- [UPS API](https://fous.com/workflows/ups.md): UPS ships and delivers packages, provides available tracking status and history, and estimates guest retail prices and delivery times, with end-of-day shown as 23:59 local time and counter prices varying.
- [DHL API](https://fous.com/workflows/dhl.md): Track DHL shipments across its delivery services.
- [USPS API](https://fous.com/workflows/usps.md): USPS provides latest available package tracking, standardized U.S. addresses with ZIP+4, recommended cities for five-digit ZIP Codes, and estimated domestic postage and delivery dates.
- [17TRACK API](https://fous.com/workflows/17track.md): Worldwide parcel tracking across multiple carriers.
- [Parcels API](https://fous.com/workflows/parcels.md): Worldwide package tracking with automatic carrier detection.
- [Maersk API](https://fous.com/workflows/maersk.md): Ocean shipping and logistics tracking.
- [Freightos API](https://fous.com/workflows/freightos.md): Ocean container freight rates by global index and trade lane.
- [Flightradar24 API](https://fous.com/workflows/flightradar24.md): Flightradar24 provides live flight tracking, recent history, flight status and times, plus upcoming airport departures and arrivals; history and schedules are limited to recent and upcoming flights.
- [All Logistics workflows](https://fous.com/workflows/category/logistics)
