Skip to main content
HomeAPI DocsQuickstart

Quickstart

Get from zero to your first downloaded dataset in 5 minutes. We'll authenticate, search, preview, purchase a free listing, and pull the file — using curl so you can copy-paste in any terminal.

Prefer the SDKs? The same flow in TypeScript and Python is at the bottom of this page.

1

Get an API key

~1 min

API keys are how agents and scripts authenticate. They start with dm_live_ and never expire until you revoke them.

Agent path (one HTTP call):

cURL — programmatic signup
curl -X POST "https://dagentbase.com/api/v1/auth/signup" \
  -H "Content-Type: application/json" \
  -d '{"email": "your-agent@example.com", "terms_accepted": true}'

Response includes the raw key — store it once. The endpoint auto-confirms the email and is rate-limited to 5 signups per IP per 24 hours. Accounts created this way start on the anonymous tier with 10 free claims per day; sign in with GitHub or Google to upgrade to 100/day, or complete any paid purchase for unlimited.

Human path:

  1. Create an account if you don't have one (free, no credit card).
  2. Open /settings and scroll to the API Keys section.
  3. Click Create API Key, give it a name like my-first-agent, and copy the key — it's shown only once.

Set it as an env var so you don't paste it everywhere:

Shell
export DAGENTBASE_API_KEY="dm_live_yourkeyhere"
2

Search the marketplace

~1 min

Discovery endpoints are public — no key needed — but adding the header costs nothing and lets us track usage for you.

cURL — search for free datasets
curl "https://dagentbase.com/api/v1/listings?q=stock+prices&max_price=0&per_page=5" \
  -H "Authorization: Bearer $DAGENTBASE_API_KEY"

You'll get back a JSON envelope: data (an array of listings), error (null on success), and meta (pagination). Pick a listing and copy its id.

Capture the first result's ID for the next step
LISTING_ID=$(curl -s "https://dagentbase.com/api/v1/listings?max_price=0&per_page=1" \
  -H "Authorization: Bearer $DAGENTBASE_API_KEY" \
  | jq -r '.data[0].id')

echo "$LISTING_ID"
3

Preview the data (free, no purchase)

~1 min

Every listing exposes a free schema + sample preview. Use this to validate that the data is what you need before committing to a purchase.

cURL
curl "https://dagentbase.com/api/v1/listings/$LISTING_ID/preview" \
  -H "Authorization: Bearer $DAGENTBASE_API_KEY"

The response includes a column schema and a few sample rows. If it doesn't fit your use case, go back to step 2 and pick a different listing.

4

Complete the purchase

~1 min

Free listings complete instantly via the API, subject to your account's daily quota (10 anonymous, 50 email-verified, 100 OAuth, unlimited after any paid purchase). Paid listings return a Stripe checkout URL that a human opens in a browser to pay — agents can't complete paid purchases on their own (yet).

cURL — POST to /purchases with the listing_id
PURCHASE_ID=$(curl -s -X POST "https://dagentbase.com/api/v1/purchases" \
  -H "Authorization: Bearer $DAGENTBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"listing_id\":\"$LISTING_ID\"}" \
  | jq -r '.data.id')

echo "Purchase: $PURCHASE_ID"

On a free listing this returns the full Purchase object with status: "completed" immediately. On a paid listing it instead returns checkout_url — open it in a browser, pay, then come back to step 5.

5

Download the data

~1 min

Get a signed download URL for each file in the listing. URLs expire after 1 hour — re-fetch if the link goes stale.

cURL — GET /purchases/:id/access
curl "https://dagentbase.com/api/v1/purchases/$PURCHASE_ID/access" \
  -H "Authorization: Bearer $DAGENTBASE_API_KEY"

Pull the first file and pipe straight to disk:

cURL — download the first file
URL=$(curl -s "https://dagentbase.com/api/v1/purchases/$PURCHASE_ID/access" \
  -H "Authorization: Bearer $DAGENTBASE_API_KEY" \
  | jq -r '.data.files[0].download_url')

curl -o data.csv "$URL"
ls -lh data.csv

That's it — the file is on disk and yours forever (or until you delete it).

Same flow, in SDK form

TypeScript

quickstart.ts
import { DagentBase } from "@dagentbase/sdk";

const client = new DagentBase({ apiKey: process.env.DAGENTBASE_API_KEY! });

const results = await client.search({ q: "stock prices", max_price: 0, per_page: 1 });
const listing = results.data[0];
const purchase = await client.purchase(listing.id);
const access = await client.getDownloadUrls(purchase.id);
console.log(access.files[0].download_url);

Python

quickstart.py
import os
from dagentbase import Client

client = Client(api_key=os.environ["DAGENTBASE_API_KEY"])

results = client.search(q="stock prices", max_price=0, per_page=1)
listing = results["data"][0]
purchase = client.purchase(listing["id"])
access = client.get_download_urls(purchase["data"]["id"])
print(access["data"]["files"][0]["download_url"])

Using Claude or another AI agent?

dAgentBase ships an MCP server so Claude Desktop, Claude Code, and claude.ai can search, preview, purchase, and download natively inside a conversation. See MCP Integration in the API reference.

What's next