canonical: https://jentic.com/apis/gocodebook.com/gocodebook

# GoCodebook API

The GoCodebook API searches California local ordinances, the city and county codes, and returns structured results with verbatim excerpts, citations, and links. A search can be run as a POST body or as a GET query string, and a keyless free sample is available at a per-address rate limit while paid searches add an AI overview. It also lists the cities and counties it covers, returns one jurisdiction with the local codes held for it, and exposes topic ids reserved for state law.

## For AI agents

Search California city and county ordinances and get structured results with verbatim excerpts, citations, and links, plus jurisdiction coverage lookups.

## Scope

Does not provide legal advice, draft documents, or cover federal or out-of-state law. Use for searching California city and county ordinances and returning cited excerpts only.

## Capabilities

- Search California city and county ordinances and get cited excerpts with links
- Run a search by POST body or as a GET query string
- List the California cities and counties the service covers
- Fetch one jurisdiction and the local codes held for it
- Read the topic ids reserved for state law

## Use cases

### Agent-Driven Ordinance Lookup

An AI agent answers a question about a local law and needs the actual code text, not a guess. It searches the relevant California jurisdiction, reads back verbatim excerpts with citations and links, and cites them in its answer. Jentic exposes the GoCodebook search operation with its input schema so the agent sends the query and jurisdiction correctly on the first call.

Example prompt: Search a named California city for its short-term rental ordinance and return the cited excerpts with their source links

### Jurisdiction Coverage Checks

A tool needs to confirm whether a given California city or county is covered before it promises an answer. The GoCodebook API lists the covered jurisdictions and returns one jurisdiction with the local codes held for it, so the tool can tell a user up front what is available. Coverage is read directly rather than assumed.

Example prompt: List the covered jurisdictions, then fetch one county to see the local codes held for it

### Cited Legal Research

A research workflow gathers ordinance text with citations for a compliance brief. The GoCodebook API returns verbatim excerpts, citations, and links for each search, with an AI overview on paid searches, so the brief quotes the code rather than paraphrasing it. Searches that return no results are not charged.

Example prompt: Run a paid search for a topic in one city and capture the verbatim excerpts and citations for a compliance brief

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/search` | Search local ordinances |
| GET | `/v1/search` | Search local ordinances by query string |
| GET | `/v1/jurisdictions` | List covered California cities and counties |
| GET | `/v1/jurisdictions/{id}` | Fetch one jurisdiction and its local codes |
| GET | `/v1/topics` | Read topic ids reserved for state law |

## Key resources

- **Search** — Search local ordinances by POST body or GET query string and return cited excerpts
- **Jurisdictions** — List covered California cities and counties and fetch one with its local codes
- **Topics** — Read the topic ids reserved for state law

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 37 / 100
- **Maturity:** Non-Ready
- **Dimensions:**
  - Foundational Compliance: 90 / 100
  - Developer Experience & Jentic Compatibility: 67 / 100
  - AI-Readiness & Agent Experience: 15 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 40 / 100
- **View full report:** https://jentic.com/apis/gocodebook.com/gocodebook/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the GoCodebook API by hand means managing its gcb_live_ bearer token, deciding between the keyless free sample and paid searches, and handling the POST and GET search forms. Through Jentic you install once, import GoCodebook from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** GoCodebook's search takes the query in the request body or query string, so a rule bounds which operations your agent may call, such as search and jurisdiction lookups. Every operation is a read, so you choose exactly which lookups the agent may run and nothing it calls changes data.
- **Credential handling:** Your GoCodebook token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'search a local ordinance' or 'list covered jurisdictions', and Jentic returns the matching GoCodebook operation with its input schema so the agent calls the right endpoint without reading the reference docs.

## Related APIs

- **CourtRules** — CourtRules searches court rules and procedural law.
- **UniCourt** — UniCourt provides court case and litigation data.
- **GovInfo** — GovInfo serves official US federal government documents.

## FAQ

### What authentication does the GoCodebook API use?

The GoCodebook API accepts a bearer token in the Authorization header, in the gcb_live_ key format, for paid access, while a keyless free sample is available at a per-address rate limit per its OpenAPI spec. Through Jentic the token is stored encrypted by your own Jentic One instance and injected at call time, so it never sits in your agent's prompt or logs.

### Can I search local ordinances with the GoCodebook API?

Yes. The search operation takes a query and a jurisdiction, by POST body or GET query string, and returns verbatim excerpts with citations and links. Paid searches add an AI overview, and a search that returns no results is not charged.

### What are the rate limits for the GoCodebook API?

The GoCodebook free sample is rate-limited per address and paid searches draw from a prepaid balance. See the developer documentation at https://gocodebook.com/developers for current limits and pricing.

### Is there a GoCodebook MCP server?

You do not need an MCP server to give your agent the GoCodebook API. Jentic connects it directly from the API Directory: import it, store your token once, and your agent calls its operations. Operations are discovered on demand, so your agent's context stays lean instead of loading a full tool list up front.

### Can I limit what my agent is allowed to do with the GoCodebook API?

Yes. Write a rule that allows only the search and jurisdiction-list operations, so the agent can search ordinances and check coverage, and every call it makes is logged. Every GoCodebook operation is a read, so nothing it calls changes data.

### How do I search ordinances with the GoCodebook API through Jentic?

Search Jentic for 'search California local ordinances', and it returns the GoCodebook search operation with its input schema. Your agent sends the query and jurisdiction and reads back the cited excerpts. To run it on your own infrastructure, install Jentic One from its GitHub repo.
