# Extract

## Build an unsigned transaction to extract the special sats in your address

<mark style="color:green;">`POST`</mark> `https://api.ordinalsbot.com/satextractor/extract`

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| x-api-key<mark style="color:red;">\*</mark> | String | API Key     |

#### Request Body

| Name                                                       | Type      | Description                                                                                                                                                                                                                                                                                   |
| ---------------------------------------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| scanAddress<mark style="color:red;">\*</mark>              | String    | The bitcoin address to scan                                                                                                                                                                                                                                                                   |
| addressToSendSpecialSats<mark style="color:red;">\*</mark> | String    | The address where we will send the special sats                                                                                                                                                                                                                                               |
| addressToSendCommonSats<mark style="color:red;">\*</mark>  | String    | The address where we will send all of the rest of the bitcoin in the given address                                                                                                                                                                                                            |
| feePerByte<mark style="color:red;">\*</mark>               | Integer   | The fee per byte for the transaction: make sure you use an up-to date fee per byte!                                                                                                                                                                                                           |
| filterSatributes                                           | String\[] | <p>Array of strings, if supplied we will only detect the selected satributes; Everything else will be sent to the common sats address.</p><p></p><p>You can get a list of supported satributes on the <a href="../sat-scanner-api/supported-satributes">Supported Satributes</a> endpoint</p> |

{% tabs %}
{% tab title="200: OK Transaction hex" %}

```javascript
{
    "specialRanges": [
        {
            "start": 280810779975733,
            "output": "826fe75c2e9d567baa6bee11160ae265b3007814ecca79299c5bd8338298b5d5:0",
            "size": 1,
            "offset": 0,
            "satributes": [
                "pizza"
            ]
        }
    ],
    "tx": "0200000001d5b5988233d85b9c2979caec147800b365e20a1611ee6baa7b569d2e5ce76f820000000000fdffffff02220200000000000022512044ddb479c1fe1e5c6ca9c2d1b477fcf7eb024e57f5aee10f2507f0c450c47da85c1100000000000016001402b3df8c029274deabfac0ace62f9fddae7dbfca00000000"
}
```

{% endtab %}
{% endtabs %}
