# Sell my data

URL: /products/data/sell-my-data · Id: `guide:sell-my-data`

> Say "sell renewal dates by county, a cent per lookup" and get a Dataset, an API with keys, a Meter and a monthly usage bill.

A [Dataset](/business/nouns/dataset) sold as a product: customers query it through the API or an agent, and a [Meter](/business/nouns/meter) counts each lookup for the monthly bill.

Needs: [Startup](/business/nouns/startup)

**Before real money moves**

- Who says yes: You. Your agent shows you the run and waits for your [Approval](/business/nouns/approval).
- You leave the chat: Once, at Stripe: to confirm who you are and add the bank account payouts land in.

## What you get
- 1 Dataset with its record count and last refresh (Dataset)
- 1 Offer at a cent per lookup, billed monthly (Offer)
- 1 Meter that counts lookups per customer (Meter)
- 1 API, SDK and MCP tool that query it, with keys (Interface)
- 1 Portal with keys, usage and downloads (Portal)

## Your agent does
**For agents**

- Guide: `guide:sell-my-data`, status `beta`. Page: [/products/data/sell-my-data.md](/products/data/sell-my-data.md).
- Approval: ask the founder first. Show the run, then wait for their Approval; a refusal ends it.
- Leaves the chat: Once, at Stripe: to confirm who you are and add the bank account payouts land in.
- Needs first: [Startup](/business/nouns/startup).
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Dataset.create`](/business/nouns/dataset/create) (`verb:Dataset.create`) | `name` string, required: example `"Renewal dates by county"`; `promise` text, required: example `"Every lease end date traces to its public filing, refreshed weekly."` | `dataset` Dataset |
| 2 | [`Offer.create`](/business/nouns/offer/create) (`verb:Offer.create`) | `price` money, required: example `{"amount":0.01,"currency":"USD"}`; `terms` text: example `"Billed monthly for the lookups made. Records may be used inside your own product, not resold as a list."`; `interval` string: example `"month"` | `offer` Offer |
| 3 | [`Offer.publish`](/business/nouns/offer/publish) (`verb:Offer.publish`) | `offer` Offer (an id), required: the `$id` step 2 returns | `offer` Offer |

Returns: the last call answers with `offer` and its `action`, whose `status` is `done`, `pending` (waiting on an Approval or a Worker), `failed`, `canceled` or `refused`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "offer": {
    "$id": "https://api.sb/leaseline.app/offers/offer_1",
    "$type": "Offer",
    "price": {
      "amount": 0.01,
      "currency": "USD"
    },
    "interval": "month",
    "terms": "Billed monthly for the lookups made. Records may be used inside your own product, not resold as a list."
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/action_1",
    "operation": "Offer.publish",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/action_1"
  }
}
```

Next: offer “Add a $99 monthly plan with 25,000 lookups”, or “Let people try 50 lookups free”.

Calls: `Dataset.create` → `Offer.create` → `Offer.publish`

Ask:

```text
Sell renewal dates by county as data.
Charge a cent per record looked up.
Turn our records into a data product.
```

API:

```bash
# 1. Dataset.create
curl -X POST https://api.sb/leaseline.app/datasets \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Renewal dates by county","promise":"Every lease end date traces to its public filing, refreshed weekly."}'

# 2. Offer.create
OFFER=$(curl -X POST https://api.sb/leaseline.app/offers \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"price":{"amount":0.01,"currency":"USD"},"interval":"month","terms":"Billed monthly for the lookups made. Records may be used inside your own product, not resold as a list."}' | jq -r '.offer["$id"] | split("/") | last')

# 3. Offer.publish
curl -X POST https://api.sb/leaseline.app/offers/$OFFER/publish \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

SDK:

```ts
import { $ } from 'startup-builder'

await $.Dataset.create({ name: 'Renewal dates by county', promise: 'Every lease end date traces to its public filing, refreshed weekly.' })
const offer = await $.Offer.create({ price: { amount: 0.01, currency: 'USD' }, interval: 'month', terms: 'Billed monthly for the lookups made. Records may be used inside your own product, not resold as a list.' })
await $.Offer.publish({ offer: offer.$id })
```

CLI:

```bash
npx startup-builder do Dataset.create --json '{"name":"Renewal dates by county","promise":"Every lease end date traces to its public filing, refreshed weekly."}'
OFFER=$(npx startup-builder do Offer.create --json '{"price":{"amount":0.01,"currency":"USD"},"interval":"month","terms":"Billed monthly for the lookups made. Records may be used inside your own product, not resold as a list."}' | jq -r '.offer["$id"] | split("/") | last')
npx startup-builder do Offer.publish --json '{"offer":"'"$OFFER"'"}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "await $.Dataset.create({ name: 'Renewal dates by county', promise: 'Every lease end date traces to its public filing, refreshed weekly.' })\nconst offer = await $.Offer.create({ price: { amount: 0.01, currency: 'USD' }, interval: 'month', terms: 'Billed monthly for the lookups made. Records may be used inside your own product, not resold as a list.' })\nreturn await $.Offer.publish({ offer: offer.$id })"
  }
}
```

## Change it
- Add a $99 monthly plan with 25,000 lookups.
- Let people try 50 lookups free.
- Export the whole dataset to a customer’s warehouse weekly.

## Under the hood
- Systems: [Datasets](/systems/datasets), [Billing](/systems/billing)
- Nouns: [Dataset](/business/nouns/dataset), [Offer](/business/nouns/offer), [Meter](/business/nouns/meter)
- Events: `Dataset.created`, `Offer.created`, [`Offer.published`](/business/events/Offer.published)
- Stripe objects: `Product`, `Price`, `Billing Meter`