{
  "openapi": "3.1.0",
  "info": {
    "title": "GoCodebook API",
    "version": "1.0.0",
    "description": "Search California local ordinances (city and county codes) and get structured results with verbatim excerpts, citations and links.\n\n**Free sample** — no key, rate-limited per address, no AI overview.\n\n**Paid access** — send an API key (`Authorization: Bearer gcb_live_…`). $0.30 a search with the AI overview included, drawn from a prepaid balance; a search with no results is not charged. `gcb_test_…` keys are free and rate-limited. Pricing, keys and limits: https://gocodebook.com/developers\n\nRequests, including query text, are stored. Results are code text, not legal advice."
  },
  "servers": [
    {
      "url": "https://gocodebook.com/api"
    },
    {
      "url": "https://api.gocodebook.com",
      "description": "Dedicated API host (same API)."
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Optional. gcb_live_… or gcb_test_… keys, created by an organization owner or admin. Without a key, requests run on the free sample tier."
      }
    }
  },
  "security": [
    {},
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/v1/search": {
      "post": {
        "summary": "Search local ordinances",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "jurisdiction": {
                    "type": "string",
                    "description": "A city or county id (us-ca-san-jose), or us-ca for every California city and county. Omitted: the place the query names, else every California city and county."
                  },
                  "filters": {
                    "type": "object",
                    "properties": {
                      "layers": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "local"
                          ]
                        },
                        "description": "Only `local` in the free sample."
                      },
                      "as_of": {
                        "type": "string",
                        "format": "date"
                      }
                    }
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10,
                    "default": 5
                  },
                  "include": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "overview"
                      ]
                    },
                    "description": "Paid access only. The free sample answers 403 overview_requires_paid_access."
                  },
                  "excerpt_chars": {
                    "type": "integer",
                    "minimum": 200,
                    "maximum": 1200,
                    "default": 1200
                  }
                }
              },
              "examples": {
                "basic": {
                  "value": {
                    "query": "maximum fence height in a front yard",
                    "jurisdiction": "us-ca-san-jose"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Search result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "object",
                    "request_id",
                    "query",
                    "results",
                    "notices",
                    "usage"
                  ],
                  "properties": {
                    "object": {
                      "const": "search_result"
                    },
                    "api_version": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "tier": {
                      "type": "string"
                    },
                    "query": {
                      "type": "object",
                      "properties": {
                        "text": {
                          "type": "string"
                        },
                        "jurisdiction": {
                          "allOf": [
                            {
                              "type": "object",
                              "required": [
                                "id",
                                "name",
                                "level"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "examples": [
                                    "us-ca-san-jose"
                                  ],
                                  "description": "Public jurisdiction id: country-region-place."
                                },
                                "name": {
                                  "type": "string"
                                },
                                "level": {
                                  "type": "string",
                                  "enum": [
                                    "national",
                                    "subnational",
                                    "county",
                                    "municipal"
                                  ]
                                }
                              }
                            }
                          ],
                          "properties": {
                            "resolved_from": {
                              "type": "string",
                              "enum": [
                                "request",
                                "query",
                                "default"
                              ]
                            },
                            "includes_all_local": {
                              "type": "boolean"
                            }
                          }
                        },
                        "filters_applied": {
                          "type": "object"
                        }
                      }
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "rank",
                          "citation",
                          "section",
                          "document",
                          "jurisdiction",
                          "layer",
                          "excerpt",
                          "excerpt_truncated",
                          "url"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Section id. In the free sample it may change when a code is re-collected."
                          },
                          "rank": {
                            "type": "integer"
                          },
                          "score": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Relative relevance within this response."
                          },
                          "citation": {
                            "type": "string",
                            "examples": [
                              "San Jose Municipal Code § 20.80.175"
                            ]
                          },
                          "section": {
                            "type": "object",
                            "properties": {
                              "number": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "heading": {
                                "type": "string"
                              },
                              "path": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "document": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "ordinance",
                                  "statute",
                                  "regulation",
                                  "building_code",
                                  "guidance",
                                  "case"
                                ]
                              },
                              "edition": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          },
                          "jurisdiction": {
                            "type": "object",
                            "required": [
                              "id",
                              "name",
                              "level"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "examples": [
                                  "us-ca-san-jose"
                                ],
                                "description": "Public jurisdiction id: country-region-place."
                              },
                              "name": {
                                "type": "string"
                              },
                              "level": {
                                "type": "string",
                                "enum": [
                                  "national",
                                  "subnational",
                                  "county",
                                  "municipal"
                                ]
                              }
                            }
                          },
                          "layer": {
                            "type": "string",
                            "enum": [
                              "national",
                              "subnational",
                              "local"
                            ]
                          },
                          "excerpt": {
                            "type": "string",
                            "description": "Plain text, at most excerpt_chars characters. Never the whole section."
                          },
                          "excerpt_truncated": {
                            "type": "boolean"
                          },
                          "url": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The full section on gocodebook.com. Show it to your users."
                          }
                        }
                      }
                    },
                    "notices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "code",
                          "message"
                        ],
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "Stable code. New codes may be added; show `message` for a code you do not recognise.",
                            "examples": [
                              "section_not_found",
                              "section_elsewhere",
                              "section_prefix",
                              "zone_not_found",
                              "scope_mismatch",
                              "corpus_gap",
                              "as_of_gap",
                              "address_query",
                              "jurisdiction_needed"
                            ]
                          },
                          "message": {
                            "type": "string"
                          },
                          "data": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    "overview": {
                      "type": "object",
                      "required": [
                        "status"
                      ],
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "complete",
                            "failed",
                            "rate_limited"
                          ]
                        },
                        "summary": {
                          "type": "string",
                          "description": "The bottom line, at most ~350 characters, with [n] markers."
                        },
                        "why": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "check_next": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "text": {
                          "type": "string",
                          "description": "The whole overview as markdown."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "marker": {
                                "type": "integer"
                              },
                              "citation": {
                                "type": "string"
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "section_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "result_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The matching entry in `results`, when it is there."
                              }
                            }
                          }
                        },
                        "model": {
                          "type": "string"
                        },
                        "disclaimer": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "description": "Present only on paid requests that asked for it."
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "search": {
                          "type": "integer"
                        },
                        "overview": {
                          "type": "integer"
                        },
                        "units": {
                          "type": "integer",
                          "description": "Units charged for this request (keys only; 0 for test keys)."
                        },
                        "month_to_date_units": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Live keys only."
                        },
                        "cost_usd": {
                          "type": "number",
                          "description": "Prepaid live keys: what this request cost."
                        },
                        "balance_usd": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Prepaid live keys: the API balance after it."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient prepaid balance, or an invoiced account's monthly cap",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Needs paid access or a feature not enabled (e.g. the AI overview)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Nothing ran.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Search local ordinances (query-string form)",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "overview"
              ]
            }
          },
          {
            "name": "layers",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "as_of",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "excerpt_chars",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Same body as POST"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient prepaid balance, or an invoiced account's monthly cap",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Needs paid access or a feature not enabled (e.g. the AI overview)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Nothing ran.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/jurisdictions": {
      "get": {
        "summary": "List California cities and counties",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Name contains."
          },
          {
            "name": "level",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "county",
                "municipal"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of jurisdictions"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient prepaid balance, or an invoiced account's monthly cap",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Needs paid access or a feature not enabled (e.g. the AI overview)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Nothing ran.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/jurisdictions/{id}": {
      "get": {
        "summary": "One jurisdiction and the local codes held for it",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Jurisdiction"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient prepaid balance, or an invoiced account's monthly cap",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Needs paid access or a feature not enabled (e.g. the AI overview)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not covered"
          },
          "429": {
            "description": "Rate limited. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Nothing ran.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "request_id"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "type",
                        "code",
                        "message"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "authentication",
                            "permission",
                            "billing",
                            "rate_limited",
                            "not_found",
                            "api_error"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/topics": {
      "get": {
        "summary": "Topic ids (reserved for state law)",
        "responses": {
          "200": {
            "description": "List"
          }
        }
      }
    }
  }
}