API Documentation

Authentication

To access the API, you need to provide your API key as a query parameter. You can get your API key from your dashboard.

?apikey=your-api-key

Endpoints

Get Dataset Data

GET /api/v1/data/{username}/{identifier}

Returns data from a specific dataset. Requires authentication and valid subscription for paid datasets.

Query Parameters

  • apikey (required) - Your API key
  • format (optional) - Response format: "json" (default) or "csv"
  • limit (optional) - Number of rows to return (default: 10000, max: 1000000000)

Response Format

The API returns data in one of two formats:

  • JSON (default) - Content-Type: application/json
  • CSV - Content-Type: text/csv (when format=csv parameter is used)

Access Control

Access to datasets is controlled by:

  • Valid API key
  • Active subscription for paid datasets
  • Sample API key allows access to first 10 rows only

Example Usage

# Get JSON data (default)
curl "https://publicdatamarket.com/api/v1/data/username/dataset?apikey=your-api-key&limit=100"

# Get CSV data
curl "https://publicdatamarket.com/api/v1/data/username/dataset?apikey=your-api-key&format=csv&limit=100"