{
  "openapi": "3.1.0",
  "info": {
    "title": "Pencil vs. Feedback Public Knowledge & Discovery API",
    "version": "2026.11.30",
    "description": "Public, zero-auth, read-only JSON, Markdown, Dataset, oEmbed, and MCP API for Pencil vs. Feedback wordless animated cartoons, 3D drawing tricks, optical illusions, visual transcripts, and verified puzzle answers across 18 languages.",
    "contact": {
      "name": "Never Ending Solutions",
      "url": "https://neverendingsolutions.com",
      "email": "hello@pencilvsfeedback.com"
    },
    "license": {
      "name": "CC BY 4.0",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    }
  },
  "servers": [
    {
      "url": "https://pencilvsfeedback.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/answer": {
      "get": {
        "operationId": "answerQuestion",
        "summary": "Synthesize a grounded direct answer with canonical citations, matching Shorts, and Wikidata entities (supports JSON and Accept: text/markdown)",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "how to connect 9 dots with 4 lines"
          },
          {
            "name": "locale",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "es",
                "pt",
                "fr",
                "de",
                "hi",
                "ja",
                "ko",
                "id",
                "ar",
                "zh",
                "ru",
                "tr",
                "it",
                "vi",
                "th",
                "pl",
                "nl"
              ],
              "default": "en"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "md"
              ],
              "default": "json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Grounded direct answer with canonical citations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/chunks.jsonl": {
      "get": {
        "operationId": "getRagChunksJsonl",
        "summary": "Download pre-chunked self-contained atomic RAG passages (JSONL) with deep-link canonical anchors and Wikidata URIs",
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/qa.jsonl": {
      "get": {
        "operationId": "getVerifiedQaJsonl",
        "summary": "Download verified Question-Answer corpus (JSONL) covering tutorials, optical illusions, puzzle answers, comparisons, benchmarks, and FAQs",
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/benchmarks.json": {
      "get": {
        "operationId": "getScientificBenchmarks",
        "summary": "Download verified quantitative visual perception, reaction-time, color-vision, optical-illusion, and puzzle benchmarks alongside live catalog counts",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/challenge-stats": {
      "get": {
        "operationId": "getLiveChallengeStats",
        "summary": "Fetch anonymous real-player aggregate distributions from Eye Precision, Visual Reaction Speed (ms), Odd-Hue Color Vision, and Drawing Precision benchmarks",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/catalog.json": {
      "get": {
        "operationId": "searchCatalog",
        "summary": "Search all Pencil vs. Feedback episodes (79+ auto-synced from YouTube), visual transcripts, answer hubs, FAQs, and glossary terms",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Free-text search query"
          },
          {
            "name": "locale",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "es",
                "pt",
                "fr",
                "de",
                "hi",
                "ja",
                "ko",
                "id",
                "ar",
                "zh",
                "ru",
                "tr",
                "it",
                "vi",
                "th",
                "pl",
                "nl"
              ],
              "default": "en"
            },
            "description": "Response language locale"
          },
          {
            "name": "topic",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional topic ID filter"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Structured catalog and search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/md/{path}": {
      "get": {
        "operationId": "getMarkdownPage",
        "summary": "Fetch clean Markdown with YAML frontmatter for any page on pencilvsfeedback.com",
        "parameters": [
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "optical-illusions"
          }
        ],
        "responses": {
          "200": {
            "description": "Clean Markdown representation",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/oembed": {
      "get": {
        "operationId": "getOembed",
        "summary": "oEmbed 1.0 video embed discovery for any Pencil vs. Feedback watch or tutorial URL",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "xml"
              ],
              "default": "json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "oEmbed payload",
            "content": {
              "application/json+oembed": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/dataset.jsonl": {
      "get": {
        "operationId": "getDatasetJsonl",
        "summary": "Download CC-BY-4.0 JSONL dataset of all auto-synced wordless animations and visual transcripts",
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/dataset.csv": {
      "get": {
        "operationId": "getDatasetCsv",
        "summary": "Download CC-BY-4.0 CSV dataset of all auto-synced wordless animations and puzzle answers",
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/mcp": {
      "post": {
        "operationId": "invokeMcp",
        "summary": "Stateless read-only Model Context Protocol (JSON-RPC 2.0) server endpoint",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  }
}