You are on Base Sepolia Testnet. Tokens have no real value.
PRIV Marketplace
BrowseAll DatasetsPricingAPI Docs
PRIV Marketplace
BrowseAll DatasetsPricingAPI Docs

API Documentation

Programmatic access to the PRIV data marketplace

Quick Start

1. Get your API Key

Generate an API key from your dashboard settings. Keep this key secure and never expose it in client-side code.

2. Install the SDK

npm install @priv/sdk

3. Initialize the Client

import { PrivClient } from '@priv/sdk';

const priv = new PrivClient({
  apiKey: process.env.PRIV_API_KEY,
});

API Endpoints

GET/api/v1/marketplace/listings

List available data listings with optional filters.

Query Parameters

category - Filter by data category
minPrice - Minimum price in PRIV
maxPrice - Maximum price in PRIV
limit - Results per page (default: 20)
offset - Pagination offset
GET/api/v1/marketplace/listings/:id

Get details for a specific listing including metadata and preview data.

Path Parameters

id - The listing ID (UUID or on-chain ID)
POST/api/v1/marketplace/listings/:id/purchase

Purchase access to a listing. Requires authentication and sufficient PRIV balance.

Response

{
  "success": true,
  "data": {
    "purchaseId": "uuid",
    "accessToken": "secret_token",
    "expiresAt": "2024-02-04T00:00:00Z",
    "maxDownloads": 10
  }
}
GET/api/v1/marketplace/purchases/:id/download

Download purchased data. Requires the access token from purchase response.

Headers

X-Access-Token - The access token from purchase

Authentication

All API requests require authentication via Bearer token in the Authorization header.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.privlabs.io/api/v1/marketplace/listings

Rate Limits

TierRequests/minRequests/day
Free601,000
Standard30010,000
EnterpriseCustomUnlimited

Error Codes

401
Unauthorized
Invalid or missing API key
402
Payment Required
Insufficient PRIV balance for purchase
404
Not Found
Listing or resource does not exist
429
Rate Limited
Too many requests, slow down