{
  "openapi": "3.1.0",
  "info": {
    "title": "Wycord Registry API",
    "version": "1.0.0",
    "description": "Read-only, CORS-open JSON API over the Wycord registry of status-verified African developer and AI infrastructure (APIs, MCP servers, datasets, tools, AI)."
  },
  "servers": [
    {
      "url": "https://wycord.com"
    }
  ],
  "paths": {
    "/api/resources": {
      "get": {
        "operationId": "listResources",
        "summary": "Search and list verified resources",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Full-text search over name, description, subcategory, notes, tags."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "apis",
                "mcp",
                "datasets",
                "tools",
                "ai"
              ]
            },
            "description": "Filter by category slug. Unknown values return 400."
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by country: ISO-2 code or name, any case (e.g. NG, ng, Nigeria, Pan-African). Unknown values return 400."
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by tag slug."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60,
              "default": 24
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of resources.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceList"
                }
              }
            }
          },
          "400": {
            "description": "Unknown category or country.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Resource": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "enum": [
              "API",
              "MCP",
              "DATASET",
              "TOOL",
              "AI"
            ]
          },
          "subcategory": {
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "documentation_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "github_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "pricing": {
            "type": [
              "string",
              "null"
            ]
          },
          "verified": {
            "type": "boolean"
          },
          "featured": {
            "type": "boolean"
          },
          "country": {
            "type": "string",
            "description": "ISO-2 code or 'Pan-African'."
          },
          "docs_status": {
            "type": "string",
            "enum": [
              "LIVE",
              "BROKEN",
              "UNAVAILABLE",
              "REDIRECT",
              "SHUT_DOWN"
            ]
          },
          "licensing_required": {
            "type": "string",
            "enum": [
              "NONE",
              "APPROVAL",
              "INSTITUTIONAL",
              "PAID_ONLY"
            ]
          },
          "last_verified": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "name",
          "slug",
          "description",
          "category",
          "country",
          "docs_status",
          "url"
        ]
      },
      "ResourceList": {
        "type": "object",
        "properties": {
          "query": {
            "type": "object"
          },
          "pagination": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer"
              },
              "pageSize": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              },
              "totalPages": {
                "type": "integer"
              }
            }
          },
          "count": {
            "type": "integer"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Resource"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "valid_categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "valid_countries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}