BoltHub logoBoltHub
Guides

Directory API

Open JSON API for discovering L402 paywalled APIs; powers the API Hub website, MCP registry, and llms.txt.

Overview

The bolthub directory API (REST paths under /directory on the API host) is an open, unauthenticated JSON API for discovering L402 paywalled APIs. It powers the API Hub website, the MCP registry, and the llms.txt feed. Third-party tools and agents can query it directly.

Base URL: https://api.bolthub.ai/directory

All endpoints return JSON and require no authentication.

Endpoints

List APIs

GET /directory

Returns a list of active APIs. Results are capped to the limit value per response.

ParameterTypeDefaultDescription
searchstring-Full-text search across names, slugs, descriptions, tags, and endpoint paths
tagstring-Filter by tag (case-insensitive)
pagenumber1Page number (1-1000)
limitnumber50Results per page (max 50)
sortstringrelevancerelevance or recent

Pagination applies to managed (hosted) directory entries. External listings are merged into results and may appear inconsistently across pages when combined with high page numbers.

Response:

{
  "entries": [
    {
      "slug": "bitcoin-data",
      "name": "Bitcoin Market Data",
      "description": "Real-time Bitcoin price data and block info.",
      "tags": ["bitcoin", "finance"],
      "gatewayDomain": "https://bitcoin-data.gw.bolthub.ai",
      "endpointCount": 2,
      "quality": {
        "isHealthy": true,
        "uptimePercentage": 99.8,
        "avgResponseTimeMs": 145
      },
      "endpoints": [
        {
          "path": "/v1/prices",
          "method": "GET",
          "title": "Current BTC Price",
          "description": "Get the current Bitcoin price in USD, EUR, and GBP.",
          "docsUrl": null,
          "pricingModel": "per_request",
          "priceSats": 5,
          "tokenBudget": null,
          "durationMinutes": null,
          "unitCostSats": null,
          "freeTryEnabled": true,
          "exampleRequest": { "query": { "currency": "USD" } },
          "exampleResponse": { "USD": 97250, "EUR": 89100 }
        }
      ]
    }
  ],
  "tags": ["bitcoin", "finance", "weather", "ai"],
  "total": 12,
  "hasMore": false
}

Get API details

GET /directory/:slug

Returns full details for a specific API, including the wallet pubkey for NWC Zap verification.

Response:

Same shape as a single entry from the list response, plus:

{
  "walletPubkey": "abc123...",
  "isExternal": false
}

For external (non-hosted) listings, isExternal is true and walletPubkey is null.

Get MCP config

GET /directory/:slug/mcp-config

Returns a ready-to-paste MCP client config for the given API.

Categories

GET /directory/categories

Returns all tags with their API counts:

{
  "categories": [
    { "tag": "finance", "count": 5 },
    { "tag": "ai", "count": 3 }
  ],
  "total": 8
}

JSON Feed

GET /directory/feed.json

Returns a JSON Feed 1.1 of recently listed APIs. Subscribe to this feed to get notified when new APIs are added.

Each item includes a _bolthub extension with structured data:

{
  "_bolthub": {
    "slug": "bitcoin-data",
    "gateway": "https://bitcoin-data.gw.bolthub.ai",
    "endpointCount": 2,
    "endpoints": [
      { "method": "GET", "path": "/v1/prices", "pricingModel": "per_request", "priceSats": 5 }
    ]
  }
}

Machine-readable discovery

llms.txt

GET https://bolthub.ai/llms.txt

A text summary of the marketplace for AI crawlers and LLMs, following the llms.txt convention. Includes usage instructions, pricing models, and the top 20 APIs.

llms-full.txt

GET https://bolthub.ai/llms-full.txt

Extended version with all listed APIs and full endpoint details.

Per-gateway discovery

Each API gateway exposes its own discovery endpoints:

URLDescription
https://{slug}.gw.bolthub.ai/.well-known/l402-gateway.jsonL402 metadata, endpoints, pricing, MCP config URL
https://{slug}.gw.bolthub.ai/.well-known/openapi.jsonOpenAPI 3.1 spec with x-l402-pricing extensions
https://{slug}.gw.bolthub.ai/.well-known/mcp.jsonMCP server config for the bridge

Quality signals

The quality object on each directory entry provides health and performance data:

FieldTypeDescription
isHealthybooleanAll endpoints are currently reachable
uptimePercentagenumber | null7-day average uptime percentage (0-100)
avgResponseTimeMsnumber | nullAverage response time from health probes in milliseconds

These are computed from automated health checks that run every 5 minutes against all active endpoints.

Pricing models

The pricingModel field indicates how the endpoint is priced:

ModelFieldsDescription
per_requestpriceSatsFixed sats per call
per_kbpriceSats, unitCostSatsDeposit + sats per KB of response
token_bucketpriceSats, tokenBudgetOne payment for N requests
time_passpriceSats, durationMinutesOne payment for N minutes
meteredpriceSats, unitCostSatsDeposit + per-request deduction

Rate limits

The directory API is rate-limited per IP address:

  • 100 requests per minute per endpoint path.
  • 300 requests per minute global cap across all API paths.

Exceeding either limit returns a 429 Too Many Requests response. Cache responses where possible. The list and category endpoints return data that changes infrequently (new APIs are added at most a few times per day).