REST API Documentation

Programmatic access to the Blockchain Library knowledge base. All endpoints return JSON and require an API key.

Getting Started

The Blockchain Library API provides read access to our entire knowledge base — articles, glossary terms, books, and research papers — plus a full-text search endpoint.

Base URL

text
https://api.theblockchainlibrary.com

Authentication

All requests require an API key passed in the Authorization header:

text
Authorization: Bearer YOUR_API_KEY

Endpoints

GET/articles

List published articles with optional filtering and pagination.

Parameters

category_id, difficulty, sort, limit, skip

Example Request

bash
curl -X GET "https://api.theblockchainlibrary.com/articles?limit=10&sort=-published_date" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

json
{
  "results": [
    {
      "id": "...",
      "title": "What is Blockchain?",
      "slug": "what-is-blockchain",
      "summary": "A comprehensive guide...",
      "difficulty": "beginner",
      "reading_time": 8,
      "published_date": "2024-01-15"
    }
  ],
  "total": 1247
}
GET/articles/:slug

Retrieve a single article by its slug, including full body and metadata.

Parameters

slug

Example Request

bash
curl -X GET "https://api.theblockchainlibrary.com/articles/what-is-blockchain" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

json
{
  "id": "...",
  "title": "What is Blockchain?",
  "slug": "what-is-blockchain",
  "body": "Full markdown content...",
  "key_takeaways": ["..."],
  "related_articles": ["..."]
}
GET/glossary

List glossary terms with optional category filtering.

Parameters

category_id, difficulty, limit, skip

Example Request

bash
curl -X GET "https://api.theblockchainlibrary.com/glossary?limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

json
{
  "results": [
    {
      "title": "Smart Contract",
      "slug": "smart-contract",
      "definition": "A self-executing...",
      "difficulty": "beginner"
    }
  ]
}
GET/search

Full-text search across articles, glossary terms, books, and research papers.

Parameters

q (required), type, limit

Example Request

bash
curl -X GET "https://api.theblockchainlibrary.com/search?q=defi&type=article&limit=5" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

json
{
  "query": "defi",
  "results": [
    {
      "type": "article",
      "title": "Understanding DeFi",
      "slug": "understanding-defi",
      "relevance": 0.95
    }
  ]
}

Webhooks — Coming Soon

Subscribe to content updates and knowledge graph events. Receive POST callbacks when new articles are published or glossary terms are updated.

in_development