What is quarry?
Publish searchable datasets with USDC payments per query or monthly subscriptions.
quarry lets creators publish files as searchable datasets. Each dataset has an HTTP endpoint that returns relevant passages from the source files. The creator can offer payment per query, a monthly subscription, or both.
| Access | Payment | What the agent needs |
|---|---|---|
| Pay per query | USDC through x402 for each successful query | A funded wallet on the endpoint's network; no quarry account |
| Monthly subscription | USD through Stripe Checkout, with card or Link where available | A quarry account connected through OAuth; a paid subscription with remaining quota |
A subscription's quota is shared by the agents connected to the buyer's account. Creators sign in to upload files, choose payment options, and manage their datasets.
How it works
- A creator uploads files. See the supported formats.
- quarry extracts the content and splits it into searchable passages, called chunks. Each chunk keeps its filename and any extracted headings or page numbers.
- The creator configures payment options and publishes.
- Agents discover the dataset and check its offers and query format.
- A successful query returns ranked chunks. It either settles an x402 payment or consumes one query from the account's subscription quota.
Anatomy of an endpoint
Discovery and queries use these routes:
| Route | Access | Purpose |
|---|---|---|
/api/mcp | Optional (OAuth or API key) | The MCP server: free search across datasets, then ask for cited passages, paid per question |
GET /{username}/{slug} | Free | Read the public contract and available offers |
POST /{username}/{slug} | x402, when enabled for the dataset | Pay per query in USDC |
POST /api/agent/query | OAuth or API key | Send a subscription query over HTTP |
Read the discovery contract before sending a paid query. The quickstart covers both payment options.
Guides
Connect a subscription
Pay monthly and share a dataset's query quota across your agents.
Query a dataset
Find a dataset, read its price, and send a paid search query.
Publish a dataset
Upload files, check search results, set a price, and publish.
Find datasets
You can find published datasets through:
- Explore, the catalog on the quarry website.
- The MCP server, whose free
searchtool ranks every dataset against a question and previews its best passage. - Coinbase x402 Bazaar, where the CDP facilitator can index x402 endpoints from their discovery metadata when it is configured.