{
 "openapi": "3.1.0",
 "info": {
  "title": "wheresthe.ai API",
  "version": "1.0.0",
  "description": "Read-only JSON for AI rules by jurisdiction, deadlines, China CAC generative-AI registry and FDA AI devices. No key required. Not legal advice."
 },
 "servers": [
  {
   "url": "https://wheresthe.ai"
  }
 ],
 "paths": {
  "/api/v1/rules.json": {
   "get": {
    "summary": "All AI rules",
    "description": "Every rule record with dates, status, obligations and official source.",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/rules/{id}.json": {
   "get": {
    "summary": "One rule",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK"
     },
     "404": {
      "description": "Unknown id"
     }
    }
   }
  },
  "/api/v1/jurisdictions.json": {
   "get": {
    "summary": "All jurisdictions",
    "description": "Approach, rule counts and next deadline for each jurisdiction.",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/jurisdictions/{code}.json": {
   "get": {
    "summary": "One jurisdiction",
    "description": "Lowercase code, e.g. in, eu, us-ca.",
    "parameters": [
     {
      "name": "code",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK"
     },
     "404": {
      "description": "Unknown code"
     }
    }
   }
  },
  "/api/v1/deadlines.json": {
   "get": {
    "summary": "Upcoming deadlines",
    "description": "All future dates when AI obligations start or change.",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/changes.json": {
   "get": {
    "summary": "Recent changes",
    "description": "Rules adopted, proposed or taking effect in the last 150 days.",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/registries/china-cac.json": {
   "get": {
    "summary": "China CAC registry",
    "description": "Generative AI services filed or registered with the CAC, in English.",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/registries/fda.json": {
   "get": {
    "summary": "FDA AI devices",
    "description": "FDA AI-enabled devices with applicant country.",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  }
 }
}