# Restrict

> Check goods against a destination's import prohibitions and restrictions, agency requirements and the origin's export rules with the border.bot API, plus rules of your own, kept as evidence.

Source: https://border.bot/docs/restrict
Last updated: 2026-10-21

> Documentation index: https://border.bot/llms.txt. Every page is Markdown at its URL + `.md`.


Restrict checks items against what the destination prohibits or restricts on import (agency requirements such as FDA or APHIS data at entry), what the origin restricts on export, and rules your workspace adds. The [Restrict page](https://border.bot/restrict) explains how it works.

## Endpoints

| Endpoint | What it does |
| --- | --- |
| [`POST /v1/restrictions`](https://border.bot/docs/api/check-restricted-goods) | Check up to 100 items |
| [`GET /v1/restrictions/checks`](https://border.bot/docs/api/list-restriction-checks) | Your past checks, kept as evidence |
| [`/v1/restrictions/rules`](https://border.bot/docs/api/list-restriction-rules) | List, add and remove your workspace's own rules |

## Check items

```bash
curl -X POST https://api.border.bot/v1/restrictions \
  -H "Authorization: Bearer $BORDERBOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationCountry": "US",
    "originCountry": "CN",
    "items": [
      {
        "sku": "LAPTOP-14",
        "title": "14-inch laptop",
        "hsCode": "8471.30.01.00"
      }
    ]
  }'
```

```javascript
const response = await fetch('https://api.border.bot/v1/restrictions', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.BORDERBOT_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "destinationCountry": "US",
    "originCountry": "CN",
    "items": [
      {
        "sku": "LAPTOP-14",
        "title": "14-inch laptop",
        "hsCode": "8471.30.01.00"
      }
    ]
  }),
});
const data = await response.json();
```

```python
import os

import requests

response = requests.post(
    "https://api.border.bot/v1/restrictions",
    headers={"Authorization": f"Bearer {os.environ['BORDERBOT_TOKEN']}"},
    json={
        "destinationCountry": "US",
        "originCountry": "CN",
        "items": [
            {
                "sku": "LAPTOP-14",
                "title": "14-inch laptop",
                "hsCode": "8471.30.01.00",
            },
        ],
    },
)
data = response.json()
```

```php
<?php
$ch = curl_init('https://api.border.bot/v1/restrictions');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('BORDERBOT_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'destinationCountry' => 'US',
        'originCountry' => 'CN',
        'items' => [
            [
                'sku' => 'LAPTOP-14',
                'title' => '14-inch laptop',
                'hsCode' => '8471.30.01.00',
            ],
        ],
    ]),
]);
$data = json_decode(curl_exec($ch), true);
```

Give each item its code, a title or description, or both: codes match rules by prefix, and text matches rules by keywords (a keyword match is confirmed by a model and comes with a `probability`). With `originCountry`, the origin's export rules and sanctions are checked too.

## What comes back

For each item, its `restrictions`: each rule's type (`prohibition`, `restriction` or `observation`), the agency and whether its data is `required` or `may_be_required`, the title and summary, the source and the confidence. The check says whether anything is prohibited or restricted (`hasProhibitions`, `hasRestrictions`) and returns a `checkId`, the evidence that the goods were checked.

```json
{
  "data": {
    "items": [
      {
        "sku": "LAPTOP-14",
        "title": "14-inch laptop",
        "hsCode": "8471300100",
        "restrictions": [
          {
            "id": "restriction_17f4af75ba5554",
            "source": "platform",
            "hsCode": "8471300100",
            "imposingCountry": "US",
            "direction": "IMPORT",
            "ruleType": "restriction",
            "title": "FDA: may be required",
            "summary": "FDA data may be required (radiation-emitting electronic products).",
            "agency": "FDA",
            "requirement": "may_be_required",
            "sourceUrl": "https://www.cbp.gov/document/technical-documentation/ace-appendix-pga",
            "confidence": "HIGH",
            "probability": null
          }
        ]
      }
    ],
    "matchCount": 1,
    "hasProhibitions": false,
    "hasRestrictions": true,
    "upstreamRequestId": null,
    "engine": "borderbot",
    "checkId": "01a15ac1-27b3-72dd-9b4d-5e1f66b46892"
  },
  "credits": {
    "charged": 0,
    "remaining": 96,
    "usageId": "usg_01m5dc29tdkdmpffnd43jmg1w5"
  },
  "replayed": false
}
```

## Costs and limits

A restricted-goods check costs the Restrict price per item, free by default (`GET /v1/pricing`), and the response carries `credits` like other priced calls. Checks are limited to 10 checks a minute per workspace. A destination without coverage returns `422 unsupported_country`.

## Also from

- **MCP:** `check_restricted_goods` (see [MCP](https://border.bot/docs/mcp)).
- **Classify:** every code carries the destination's `restrictions`, so you see them as soon as a product is classified.
- **Agency filings:** for what an agency needs filed at entry (a CPSC certificate or a disclaim), use [Comply](https://border.bot/docs/comply).
