{
  "openapi": "3.1.0",
  "info": {
    "title": "Tulsa Ecosystem Map data API",
    "version": "1.0.0",
    "description": "A plain-language map of the Tulsa and Oklahoma tech ecosystem for founders building an AI company: the standard terms, the well-established tools, and the local organizations, investors, programs and user groups, with how they connect. Read-only, no authentication, static JSON. For search, use the MCP server at /mcp (tool search_entries)."
  },
  "servers": [
    {
      "url": "https://ecosystem.samcarlton.com"
    }
  ],
  "paths": {
    "/api/index.json": {
      "get": {
        "operationId": "getIndex",
        "summary": "Every category and every entry, summarised",
        "responses": {
          "200": {
            "description": "The whole index",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kinds": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/KindSummary"
                      }
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "categories": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CategorySummary"
                      }
                    },
                    "entries": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EntrySummary"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/categories.json": {
      "get": {
        "operationId": "listCategories",
        "summary": "The categories with their entry counts",
        "responses": {
          "200": {
            "description": "Categories",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CategorySummary"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/categories/{id}.json": {
      "get": {
        "operationId": "getCategory",
        "summary": "One category and its entries, Tulsa entries first, then by connections",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The category",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/CategorySummary"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "members": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/EntrySummary"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such category"
          }
        }
      }
    },
    "/api/kinds.json": {
      "get": {
        "operationId": "listKinds",
        "summary": "Kinds with browse pages and their entry counts",
        "responses": {
          "200": {
            "description": "Kinds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KindSummary"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/kinds/{id}.json": {
      "get": {
        "operationId": "getKind",
        "summary": "One kind and its entries, Tulsa entries first, then by connections",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "investor",
                "organization",
                "nonprofit",
                "program",
                "school",
                "government"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The kind",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/KindSummary"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "members": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/EntrySummary"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such kind page"
          }
        }
      }
    },
    "/api/entries/{id}.json": {
      "get": {
        "operationId": "getEntry",
        "summary": "One entry: definition, example, funding evidence, official site, connections and sources",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntryDetail"
                }
              }
            }
          },
          "404": {
            "description": "No such entry"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Deal": {
        "type": "object",
        "required": [
          "claim",
          "date",
          "sourceUrl"
        ],
        "properties": {
          "claim": {
            "type": "string",
            "description": "The published funding claim, in plain language."
          },
          "amountUsd": {
            "type": "number",
            "minimum": 0,
            "description": "Dollars, only when stated by the source."
          },
          "date": {
            "type": "string",
            "pattern": "^\\d{4}(-\\d{2}(-\\d{2})?)?$",
            "description": "Recorded date at the precision published: YYYY, YYYY-MM or YYYY-MM-DD."
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri",
            "description": "The public page stating the figure."
          }
        }
      },
      "EntrySummary": {
        "type": "object",
        "required": [
          "id",
          "name",
          "kinds",
          "category",
          "summary",
          "url",
          "api"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "kinds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "kind": {
            "type": "string",
            "description": "The kinds as one phrase, e.g. 'Investor, nonprofit'."
          },
          "category": {
            "type": "string"
          },
          "summary": {
            "type": "string",
            "description": "First sentence of the definition."
          },
          "connections": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The page on the map."
          },
          "api": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "EntryDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EntrySummary"
          },
          {
            "type": "object",
            "required": [
              "deals"
            ],
            "properties": {
              "aliases": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "definition": {
                "type": "string"
              },
              "example": {
                "type": "string"
              },
              "deals": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Deal"
                },
                "description": "Published funding evidence in stored order, newest first; empty when none is recorded."
              },
              "officialSite": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              },
              "connectsTo": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  }
                }
              },
              "sources": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "markdown": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        ]
      },
      "KindSummary": {
        "$ref": "#/components/schemas/CategorySummary",
        "description": "A kind with a browse page; id is the singular kind."
      },
      "CategorySummary": {
        "type": "object",
        "required": [
          "id",
          "name",
          "entries",
          "url",
          "api"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "short": {
            "type": "string"
          },
          "entries": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "api": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  }
}