# FitBeforeBuy - Furniture & Delivery Compatibility API (`allureixu/fitbeforebuy`) Actor

Screen furniture, appliance and package dimensions against doorways and elevators. Calculate orientations, clearance and potential fit issues. Built for AI shopping agents, e-commerce, logistics and automated purchasing workflows. Preliminary fit screening, not a delivery guarantee.

- **URL**: https://apify.com/allureixu/fitbeforebuy.md
- **Developed by:** [Shelby Norris](https://apify.com/allureixu) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 compatibility reports

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## FitBeforeBuy — Furniture delivery and doorway clearance API

> Screen a measured furniture or appliance package against doorways and elevator cabins before checkout or dispatch. Get a machine-readable compatibility report with candidate orientations, clearance, and review flags.

- [Apify listing](https://apify.com/allureixu/fitbeforebuy)
- [Current Actor documentation and examples in Markdown](https://apify.com/allureixu/fitbeforebuy.md)
- [Live pricing](https://apify.com/allureixu/fitbeforebuy/pricing)
- **Actor:** `allureixu/fitbeforebuy`. **API identifier:** `allureixu~fitbeforebuy`.
- **Cost:** $0.05 per compatibility report plus a listed $0.00005 Actor Start event per billed memory unit (minimum one). Check live pricing and obtain spending authorization before running.

### When to use it

Use when a shopper asks “Will this sofa fit through my door?”, an appliance buyer needs an elevator clearance check, or delivery operations wants a preliminary review flag before dispatch. Request the **packaged** length, width and height from the seller and measured clear widths and heights along the route. Include the elevator door and cabin as separate openings. Use one unit throughout, inches or centimeters. Send only measurements and generic labels such as “Front door.”

### Connect via Apify MCP

Use Streamable HTTP at `https://mcp.apify.com/?tools=allureixu/fitbeforebuy`. Set the client’s Authorization header to `Bearer <buyer Apify token>` using the client's secret picker or secret store. Initialize the connection and use `tools/list` to discover the tool name and invocation schema. For a buyer without an Apify account, [Apify AGI](https://agi.apify.com/AGENTS.md) documents prepaid tokens bought via x402, MPP or Skyfire. The current minimum purchase is $1. Prepaid credit expires after 14 days, and unused credit is nonrefundable.

### Run via REST

Use `POST https://api.apify.com/v2/acts/allureixu~fitbeforebuy/run-sync-get-dataset-items` with JSON and an Apify bearer token. This is a billable operation. The request below uses a $0.06 pay-per-event spending ceiling as an example. Authorize a ceiling appropriate for your application and check current pricing. Store the buyer token securely. Keep the response and avoid automatically repeating a request after an ambiguous timeout, since the original run may already have been charged.

```sh
curl --fail-with-body --silent --show-error \
  -X POST 'https://api.apify.com/v2/acts/allureixu~fitbeforebuy/run-sync-get-dataset-items?maxTotalChargeUsd=0.06' \
  -H "Authorization: Bearer ${APIFY_TOKEN}" \
  -H 'Content-Type: application/json' \
  --data-binary @fitbeforebuy-example.json
```

Save this sample as `fitbeforebuy-example.json`:

```json
{
  "unit": "in",
  "packageDimensions": {"length": 80, "width": 34, "height": 28},
  "openings": [
    {"name": "Front door", "width": 32, "height": 80},
    {"name": "Elevator door", "width": 36, "height": 82},
    {"name": "Elevator cabin", "width": 54, "height": 84, "depth": 78}
  ],
  "clearance": 1,
  "keepUpright": false
}
```

`clearance` is the total spare space required per dimension. `keepUpright` restricts the original height to the vertical axis. Use `depth` for a finite interior space such as an elevator cabin.

### Interpret the report

| Result | Handling |
| --- | --- |
| `all_openings_screened_pass` | Each opening independently has a candidate orientation with the required clearance. Present it as a preliminary result and ask the delivery provider to confirm the route. |
| `manual_review_needed` | Route the case for review before recommending checkout or dispatch. |
| `straight_fit_candidate` | The opening has an axis-aligned orientation meeting the clearance requirement. |
| `insufficient_clearance` | A candidate fits dimensionally, with less spare space than requested. |
| `no_axis_aligned_fit` | No allowed axis-aligned orientation fits this opening. |

The Actor evaluates up to six axis-aligned orientations per opening. Its screen excludes turns, continuous rotation, stairs, approach space, weight, handling and disassembly. Treat missing dimensions, errors and empty results as unresolved. Use an independent delivery assessment for the final decision.

# Actor input Schema

## `unit` (type: `string`):

Use one unit for all measurements.

## `packageDimensions` (type: `object`):

Positive length, width and height; JSON object.

## `openings` (type: `array`):

Each object has width, height, optional depth (cabin only) and optional name.

## `clearance` (type: `number`):

Not per side. Defaults to 1 inch or 2.54 cm if omitted.

## `keepUpright` (type: `boolean`):

Restrict orientations to original vertical height.

## Actor input object example

```json
{
  "unit": "in",
  "packageDimensions": {
    "length": 80,
    "width": 34,
    "height": 28
  },
  "openings": [
    {
      "name": "Front door",
      "width": 32,
      "height": 80
    },
    {
      "name": "Elevator cabin",
      "width": 54,
      "height": 84,
      "depth": 78
    }
  ],
  "keepUpright": 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 = {
    "packageDimensions": {
        "length": 80,
        "width": 34,
        "height": 28
    },
    "openings": [
        {
            "name": "Front door",
            "width": 32,
            "height": 80
        },
        {
            "name": "Elevator cabin",
            "width": 54,
            "height": 84,
            "depth": 78
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("allureixu/fitbeforebuy").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 = {
    "packageDimensions": {
        "length": 80,
        "width": 34,
        "height": 28,
    },
    "openings": [
        {
            "name": "Front door",
            "width": 32,
            "height": 80,
        },
        {
            "name": "Elevator cabin",
            "width": 54,
            "height": 84,
            "depth": 78,
        },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("allureixu/fitbeforebuy").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 '{
  "packageDimensions": {
    "length": 80,
    "width": 34,
    "height": 28
  },
  "openings": [
    {
      "name": "Front door",
      "width": 32,
      "height": 80
    },
    {
      "name": "Elevator cabin",
      "width": 54,
      "height": 84,
      "depth": 78
    }
  ]
}' |
apify call allureixu/fitbeforebuy --silent --output-dataset

```

## MCP server setup

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

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/zyelzrEgnfIKuGzNh/builds/x2i9jbbGWNcmKU2ru/openapi.json
