{
  "openapi": "3.1.0",
  "info": {
    "title": "AI Consultancy Finder open data",
    "version": "1.0.0",
    "summary": "Read-only static JSON files built from the site content.",
    "description": "Static, public, read-only JSON files, rebuilt with the site. No authentication, no registration, no write operations. Pages that have been taken down are left out. Human-readable documentation: https://aiconsultancyfinder.com/developers/",
    "contact": {
      "name": "AI Consultancy Finder",
      "email": "hello@aiconsultancyfinder.com"
    }
  },
  "servers": [
    {
      "url": "https://aiconsultancyfinder.com"
    }
  ],
  "externalDocs": {
    "url": "https://aiconsultancyfinder.com/developers/"
  },
  "security": [],
  "paths": {
    "/data/search-index.json": {
      "get": {
        "operationId": "getSearchIndex",
        "summary": "The directory search index: listed practices and the taxonomy terms.",
        "responses": {
          "200": {
            "description": "The search index.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchIndex"
                }
              }
            }
          }
        }
      }
    },
    "/data/project-costs.json": {
      "get": {
        "operationId": "getProjectCosts",
        "summary": "The AI project cost benchmarks: cost ranges and durations by engagement.",
        "responses": {
          "200": {
            "description": "The cost benchmarks.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCosts"
                }
              }
            }
          }
        }
      }
    },
    "/api/health.json": {
      "get": {
        "operationId": "getHealth",
        "summary": "Static health file: present when the site is being served.",
        "responses": {
          "200": {
            "description": "The site is up.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Term": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "label"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "description": "Taxonomy kind, e.g. services, sectors, skills."
          },
          "label": {
            "type": "string"
          },
          "phrases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          }
        }
      },
      "Practice": {
        "type": "object",
        "required": [
          "id",
          "url",
          "name",
          "isOperator"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "Site-relative listing URL."
          },
          "name": {
            "type": "string"
          },
          "descriptor": {
            "type": "string"
          },
          "place": {
            "type": "string"
          },
          "district": {
            "type": "string",
            "description": "UK postcode district."
          },
          "lat": {
            "type": "number"
          },
          "lng": {
            "type": "number"
          },
          "deliveryMode": {
            "type": "string"
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sectors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skills": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "text": {
            "type": "string"
          },
          "minimumProject": {
            "type": "number",
            "description": "GBP."
          },
          "availability": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              },
              "updatedAt": {
                "type": "string"
              }
            }
          },
          "clientSizes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isOperator": {
            "type": "boolean",
            "description": "True for the listing run by the site operator (Digital Tactics)."
          }
        }
      },
      "SearchIndex": {
        "type": "object",
        "required": [
          "version",
          "terms",
          "practices"
        ],
        "properties": {
          "version": {
            "type": "integer"
          },
          "terms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Term"
            }
          },
          "practices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Practice"
            }
          }
        }
      },
      "Benchmark": {
        "type": "object",
        "required": [
          "id",
          "url",
          "title",
          "cost",
          "weeks"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "Site-relative benchmark page URL."
          },
          "title": {
            "type": "string"
          },
          "typeLabel": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "sector": {
            "type": "string"
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skills": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cost": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "minItems": 3,
            "maxItems": 3,
            "description": "Low, typical and high cost in GBP."
          },
          "weeks": {
            "type": "number"
          }
        }
      },
      "ProjectCosts": {
        "type": "object",
        "required": [
          "version",
          "benchmarks"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "const": 1
          },
          "attribution": {
            "type": "string"
          },
          "sourceUrl": {
            "type": "string"
          },
          "readOn": {
            "type": "string"
          },
          "computedOn": {
            "type": "string"
          },
          "benchmarks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Benchmark"
            }
          }
        }
      },
      "Health": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pass"
            ]
          },
          "description": {
            "type": "string"
          },
          "builtAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  }
}
