# Textbook Arbitrage (`vaunted/textbook-arbitrage`) Actor

Find profitable textbook flips in seconds! This Actor compares AbeBooks prices with BookScouter buyback offers to uncover arbitrage opportunities. Includes strict condition filtering and top-3 results per ISBN.

- **URL**: https://apify.com/vaunted/textbook-arbitrage.md
- **Developed by:** [Sage](https://apify.com/vaunted) (community)
- **Categories:** E-commerce, Lead generation, Other
- **Features:** Limited permissions
- **Stats:** 10 total users, 0 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

## Textbook Arbitrage Actor

Find profitable textbook flip opportunities by comparing **AbeBooks** and **ThriftBooks** prices with **BookScouter** buyback offers from 30+ vendors.

### ⚡ Fast & Efficient

- Process hundreds of ISBNs in minutes
- Sub-second price lookups per source
- Smart filtering saves time by checking buyback value first

**Real results:** 5 ISBNs → 6 profitable opportunities with up to **628% ROI**

### 🎯 What It Does

1. **Checks buyback prices** from 30+ vendors (BooksRun, Chegg, TextbookRush, etc.)
2. **Finds cheap copies** on AbeBooks and ThriftBooks
3. **Calculates profit** including shipping costs
4. **Filters by condition** (only "Good" or better)
5. **Returns top opportunities** sorted by profit

### 📥 Input

```json
{
    "isbns": ["9780321982384", "9780134093413"],
    "minProfit": 10,
    "minBuyback": 5,
    "maxResultsPerIsbn": 3
}
```

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `isbns` | array | required | List of ISBN-10 or ISBN-13 codes |
| `minProfit` | number | 10 | Minimum profit in USD to include |
| `minBuyback` | number | 5 | Minimum buyback price to search sources |
| `maxResultsPerIsbn` | integer | 3 | Top N opportunities per ISBN |

### 📤 Output

Each result in the dataset:

```json
{
    "isbn": "9780321982384",
    "bookTitle": "Linear Algebra and Its Applications",
    "rank": 1,
    "source": {
        "site": "ThriftBooks",
        "price": 5.99,
        "shipping": 3.99,
        "totalCost": 9.98,
        "condition": "Good",
        "sellerName": "ThriftBooks",
        "sellerRating": "98%",
        "url": "https://www.thriftbooks.com/..."
    },
    "buyback": {
        "site": "BookScouter",
        "vendor": "Chegg",
        "price": 35.00,
        "url": "https://bookscouter.com/sell/..."
    },
    "profit": 25.02,
    "roiPercentage": "250.7%",
    "timestamp": "2025-12-12T10:00:00Z"
}
```

### 📈 Example Results

From a test batch (ISBN `9780134753119` - "A First Course in Probability"):

| Source | Buy | Sell To | Profit | ROI |
|--------|-----|---------|--------|-----|
| ThriftBooks | $9.48 | BooksRun $69.01 | **$59.53** | **628%** |
| AbeBooks | $23.31 | BooksRun $69.01 | $45.70 | 196% |
| AbeBooks | $32.88 | BooksRun $69.01 | $36.13 | 110% |

### ⚙️ Configuration Tips

#### Find More Opportunities

```json
{
    "minProfit": 5,
    "minBuyback": 3,
    "maxResultsPerIsbn": 5
}
```

#### High-Value Only

```json
{
    "minProfit": 25,
    "minBuyback": 10,
    "maxResultsPerIsbn": 1
}
```

### 💡 Tips

- **Most books (~95%) have $0 buyback** - Focus on textbooks, not novels
- **Buyback quotes expire in 7 days** - Act fast on opportunities
- **Condition matters** - Only "Good" or better conditions are accepted by buyback vendors
- **US sellers preferred** - Ensures delivery within quote window

### 🐛 Troubleshooting

#### No Results Found

Most books have no buyback value. Try:

- Lowering `minBuyback` to 3
- Lowering `minProfit` to 5
- Using textbook ISBNs (not fiction/general books)

#### Missing a Source

Some ISBNs may not have listings on all sites. The actor searches all available sources and returns what it finds.

# Actor input Schema

## `isbns` (type: `array`):

List of ISBN-13 or ISBN-10 codes to search for arbitrage opportunities

## `minProfit` (type: `number`):

Only save results where potential profit exceeds this amount in USD

## `minBuyback` (type: `number`):

Only check AbeBooks if BookScouter buyback exceeds this amount (saves proxy costs)

## `maxResultsPerIsbn` (type: `integer`):

Number of top opportunities to save per ISBN (sorted by profit)

## `proxyConfiguration` (type: `object`):

RESIDENTIAL proxies are REQUIRED for BookScouter. Datacenter IPs will be blocked.

## Actor input object example

```json
{
  "isbns": [
    "9780321982384"
  ],
  "minProfit": 10,
  "minBuyback": 5,
  "maxResultsPerIsbn": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "isbns": [
        "9780321982384"
    ],
    "minProfit": 10,
    "minBuyback": 5,
    "maxResultsPerIsbn": 3,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("vaunted/textbook-arbitrage").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 = {
    "isbns": ["9780321982384"],
    "minProfit": 10,
    "minBuyback": 5,
    "maxResultsPerIsbn": 3,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("vaunted/textbook-arbitrage").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 '{
  "isbns": [
    "9780321982384"
  ],
  "minProfit": 10,
  "minBuyback": 5,
  "maxResultsPerIsbn": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call vaunted/textbook-arbitrage --silent --output-dataset

```

## MCP server setup

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

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/mVbq3fSp1E5Q1tjkg/builds/75eoEwbLWY3rOfARl/openapi.json
