# UPS API

> UPS returns package tracking details and shipping estimates as a workflow and API.

UPS returns package status, delivery details, and shipment history from a tracking number. Estimate shipping returns retail prices and delivery times using origin, destination, and package weight.

- Page: https://fous.com/tools/ups
- Handle: `@ups`
- Category: [Logistics](https://fous.com/tools/category/logistics)
- Source website: https://ups.com
- Last verified: Sep 30, 2026

## Methods

### Estimate shipping

Operation `estimate_shipping`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Estimate UPS guest retail shipping prices and delivery times from postal codes and package weight. End-of-day arrivals are shown as 23:59 local time, not a promised clock time; retail counter prices may vary.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `origin` | string | yes | `"10001, US"` | Sender postal code and two-letter country code, e.g. 10001, US. |
| `width_in` | number | no | `8` | Package width in inches, e.g. 8. |
| `height_in` | number | no | `6` | Package height in inches, e.g. 6. |
| `length_in` | number | no | `10` | Package length in inches, e.g. 12. |
| `ship_date` | string | no | `"2026-09-30"` | Date the package will ship, YYYY-MM-DD, e.g. 2026-09-29. Defaults to the next business day. |
| `weight_lb` | number | yes | `2` | Weight in pounds, e.g. 5. |
| `destination` | string | yes | `"60601, US"` | Recipient postal code and two-letter country code, e.g. 90210, US. |
| `residential_delivery` | boolean | no | `false` | Whether delivery is to a home, e.g. true. Defaults to yes. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "origin",
    "destination",
    "weight_lb"
  ],
  "properties": {
    "origin": {
      "type": "string",
      "title": "From",
      "description": "Sender postal code and two-letter country code, e.g. 10001, US.",
      "examples": [
        "10001, US"
      ]
    },
    "width_in": {
      "type": "number",
      "description": "Package width in inches, e.g. 8.",
      "exclusiveMinimum": 0,
      "examples": [
        8
      ]
    },
    "height_in": {
      "type": "number",
      "description": "Package height in inches, e.g. 6.",
      "exclusiveMinimum": 0,
      "examples": [
        6
      ]
    },
    "length_in": {
      "type": "number",
      "description": "Package length in inches, e.g. 12.",
      "exclusiveMinimum": 0,
      "examples": [
        10
      ]
    },
    "ship_date": {
      "type": "string",
      "format": "date",
      "description": "Date the package will ship, YYYY-MM-DD, e.g. 2026-09-29. Defaults to the next business day.",
      "examples": [
        "2026-09-30"
      ]
    },
    "weight_lb": {
      "type": "number",
      "description": "Weight in pounds, e.g. 5.",
      "exclusiveMinimum": 0,
      "examples": [
        2,
        5
      ]
    },
    "destination": {
      "type": "string",
      "title": "To",
      "description": "Recipient postal code and two-letter country code, e.g. 90210, US.",
      "examples": [
        "60601, US",
        "90210, US"
      ]
    },
    "residential_delivery": {
      "type": "boolean",
      "default": true,
      "description": "Whether delivery is to a home, e.g. true. Defaults to yes.",
      "examples": [
        false,
        true
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "origin": "10001, US",
      "width_in": 8,
      "height_in": 6,
      "length_in": 10,
      "ship_date": "2026-09-30",
      "weight_lb": 2,
      "destination": "60601, US",
      "residential_delivery": false
    },
    {
      "origin": "10001, US",
      "weight_lb": 5,
      "destination": "90210, US",
      "residential_delivery": true
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `services` | array |  | Available UPS services, ordered by retail price. |
| `services[].currency` | string | `"USD"` |  |
| `services[].ups_link` | string | `"https://wwwapps.ups.com/ctc/request?loc=en_US"` |  |
| `services[].guaranteed` | boolean | `false` |  |
| `services[].retail_price` | number | `17.56` |  |
| `services[].service_name` | string | `"UPS Ground"` |  |
| `services[].delivery_date_time` | string | `"2026-10-02T23:59:00-05:00"` |  |
| `services[].business_days_in_transit` | integer | `2` |  |

**Example input**

```json
{
  "origin": "10001, US",
  "width_in": 8,
  "height_in": 6,
  "length_in": 10,
  "ship_date": "2026-09-30",
  "weight_lb": 2,
  "destination": "60601, US",
  "residential_delivery": false
}
```

**Example output**

```json
{
  "services": [
    {
      "currency": "USD",
      "ups_link": "https://wwwapps.ups.com/ctc/request?loc=en_US",
      "guaranteed": false,
      "retail_price": 17.56,
      "service_name": "UPS Ground",
      "delivery_date_time": "2026-10-02T23:59:00-05:00",
      "business_days_in_transit": 2
    },
    {
      "currency": "USD",
      "ups_link": "https://wwwapps.ups.com/ctc/request?loc=en_US",
      "guaranteed": false,
      "retail_price": 44.16,
      "service_name": "UPS 3 Day Select",
      "delivery_date_time": "2026-10-05T23:59:00-05:00",
      "business_days_in_transit": 3
    },
    {
      "currency": "USD",
      "ups_link": "https://wwwapps.ups.com/ctc/request?loc=en_US",
      "guaranteed": false,
      "retail_price": 49.5,
      "service_name": "UPS 3 Day Select (Saturday Delivery)",
      "delivery_date_time": "2026-10-03T23:59:00-05:00",
      "business_days_in_transit": 3
    }
  ]
}
```

### Track package

Operation `track_package`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Track a UPS package by tracking number, including its status, delivery details and shipment history when available.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `tracking_number` | string | yes | `"1Z999AA10123456784"` | UPS tracking number, with or without spaces, for example 1Z999AA10123456784. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "tracking_number"
  ],
  "properties": {
    "tracking_number": {
      "type": "string",
      "description": "UPS tracking number, with or without spaces, for example 1Z999AA10123456784.",
      "examples": [
        "1Z999AA10123456784",
        "1Z 999AA1 0123456784"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "tracking_number": "1Z999AA10123456784"
    },
    {
      "tracking_number": "1Z 999AA1 0123456784"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `origin` | string or null | `"Germany"` |  |
| `status` | string | `"Delivered"` |  |
| `weight` | string or null |  |  |
| `history` | array |  |  |
| `history[].location` | string or null | `"LONGVIEW, TX, US"` |  |
| `history[].date_time` | string or null | `"2025-12-05T10:29:38-06:00"` |  |
| `history[].description` | string | `"DELIVERED"` |  |
| `left_at` | string or null | `"Other"` |  |
| `destination` | string or null | `"LONGVIEW, TX, US"` |  |
| `delivered_at` | string or null | `"2025-12-05T10:29:38-06:00"` |  |
| `service_type` | string or null | `"UPS Express™ 12:00"` |  |
| `tracking_link` | string | `"https://www.ups.com/track?loc=en_US&tracknum=1Z999AA10123456784"` |  |
| `tracking_number` | string | `"1Z999AA10123456784"` |  |
| `scheduled_delivery_date` | string or null |  |  |
| `scheduled_delivery_window_end` | string or null |  |  |
| `scheduled_delivery_window_start` | string or null |  |  |

**Example input**

```json
{
  "tracking_number": "1Z999AA10123456784"
}
```

**Example output**

```json
{
  "origin": "Germany",
  "status": "Delivered",
  "weight": null,
  "history": [
    {
      "location": "LONGVIEW, TX, US",
      "date_time": "2025-12-05T10:29:38-06:00",
      "description": "DELIVERED"
    },
    {
      "location": "Longview, TX, United States",
      "date_time": "2025-12-05T10:20:03-06:00",
      "description": "Out For Delivery Today"
    },
    {
      "location": "Longview, TX, United States",
      "date_time": "2025-12-05T09:26:36-06:00",
      "description": "Processing at UPS Facility"
    }
  ],
  "left_at": "Other",
  "destination": "LONGVIEW, TX, US",
  "delivered_at": "2025-12-05T10:29:38-06:00",
  "service_type": "UPS Express™ 12:00",
  "tracking_link": "https://www.ups.com/track?loc=en_US&tracknum=1Z999AA10123456784",
  "tracking_number": "1Z999AA10123456784",
  "scheduled_delivery_date": null,
  "scheduled_delivery_window_end": null,
  "scheduled_delivery_window_start": null
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@ups",
  "visibility": "public",
  "operation": "estimate_shipping",
  "version": 1,
  "input": {
    "origin": "10001, US",
    "width_in": 8,
    "height_in": 6,
    "length_in": 10,
    "ship_date": "2026-09-30",
    "weight_lb": 2,
    "destination": "60601, US",
    "residential_delivery": false
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@ups\",\n  \"visibility\": \"public\",\n  \"operation\": \"estimate_shipping\",\n  \"version\": 1,\n  \"input\": {\n    \"origin\": \"10001, US\",\n    \"width_in\": 8,\n    \"height_in\": 6,\n    \"length_in\": 10,\n    \"ship_date\": \"2026-09-30\",\n    \"weight_lb\": 2,\n    \"destination\": \"60601, US\",\n    \"residential_delivery\": false\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=180) 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.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@ups",
  "visibility": "public",
  "operation": "estimate_shipping",
  "version": 1,
  "input": {
    "origin": "10001, US",
    "width_in": 8,
    "height_in": 6,
    "length_in": 10,
    "ship_date": "2026-09-30",
    "weight_lb": 2,
    "destination": "60601, US",
    "residential_delivery": false
  },
  "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);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/ups`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `estimate_shipping`: Estimate shipping. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `track_package`: Track package. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-ups https://api.fous.com/mcp/tools/ups --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Check package status and delivery details
- Review shipment history by location and time
- Compare estimated shipping prices and delivery times
- Plan shipments using origin and destination postal codes

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this UPS tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a UPS account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from ups.com when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 30, 2026.

### What is the package's current status?

Track package uses a tracking number to return package status and shipment history when available.

### Which shipping services and prices are estimated?

Estimate shipping returns available services, retail prices, and estimated delivery times for the supplied shipment details.

## Related

- [USPS API](https://fous.com/tools/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.
- [DHL API](https://fous.com/tools/dhl.md): Track DHL shipments across its delivery services.
- [FedEx API](https://fous.com/tools/fedex.md): Shipping and package tracking.
- [Parcels API](https://fous.com/tools/parcels.md): Worldwide package tracking with automatic carrier detection.
- [17TRACK API](https://fous.com/tools/17track.md): Worldwide parcel tracking across multiple carriers.
- [Maersk API](https://fous.com/tools/maersk.md): Ocean shipping and logistics tracking.
- [Uber Eats API](https://fous.com/tools/uber-eats.md): Uber Eats shows restaurants and delivery options, with menus, prices, ratings, and delivery details; fees may reflect guest promotions and rating counts may be rounded.
- [Amtrak API](https://fous.com/tools/amtrak.md): Amtrak passenger train travel and status.
- [All Logistics tools](https://fous.com/tools/category/logistics)
