Discover/statutes.capitol.texas.gov API
live

statutes.capitol.texas.gov APIstatutes.capitol.texas.gov

Access Texas Constitution and statute text via API. Search full-text, list codes, chapters, and sections, or retrieve exact statute text by code and section number.

Endpoint health
verified 2h ago
list_codes
search_statutes
list_chapters
list_sections
get_section_text
5/5 passing latest checkself-healing
Endpoints
5
Updated
3h ago
Try it

No input parameters required.

api.parse.bot/scraper/25b4b583-9866-4ec3-a032-db0eb1266edb/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/25b4b583-9866-4ec3-a032-db0eb1266edb/list_codes' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace statutes-capitol-texas-gov-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.


"""Walkthrough: Texas Statutes SDK — browse codes, search, and read statute text."""
from parse_apis.Texas_Statutes_API import TexasStatutes, CodeNotFound

client = TexasStatutes()

# List all available statute codes
for code in client.codes.list(limit=5):
    print(code.code, code.name)

# Navigate into the Penal Code's chapters via constructible Code
penal = client.code("PE")
chapter = penal.chapters.list(limit=1).first()
if chapter:
    print(f"First chapter: {chapter.title} (key: {chapter.url_key})")

    # Drill into sections of that chapter
    for sec in chapter.sections.list(limit=3):
        print(f"  {sec.section_number}: {sec.title}")

# Full-text search across all codes
response = client.search_responses.search(query="freedom of speech")
print(f"Found {response.total_results} results for '{response.query}'")
for r in response.results:
    print(f"  [{r.document_code}] {r.title}")

# Get the actual text of a specific section
try:
    text = client.section_texts.get(code="CN", chapter="CN.1", section="1.8")
    print(f"\n{text.chapter_title} — Section {text.section}")
    print(text.text[:200])
except CodeNotFound as exc:
    print(f"Not found: {exc}")

print("exercised: codes.list / chapters.list / sections.list / search_responses.search / section_texts.get")
All endpoints · 5 totalmissing one? ·

Lists all available Texas statute codes (e.g. Penal Code, Family Code, The Texas Constitution). Each code has a short abbreviation used as the identifier in other endpoints. Returns the complete set of codes available in the system.

Input

No input parameters required.

Response
{
  "type": "object",
  "fields": {
    "codes": "array of code objects with code, code_id, and name",
    "total_codes": "integer"
  },
  "sample": {
    "data": {
      "codes": [
        {
          "code": "CN",
          "name": "The Texas Constitution",
          "code_id": "5"
        },
        {
          "code": "PE",
          "name": "Penal Code",
          "code_id": "24"
        }
      ],
      "total_codes": 31
    },
    "status": "success"
  }
}

About the statutes.capitol.texas.gov API

This API exposes 5 endpoints covering the full Texas Constitution and Statutes hosted at statutes.capitol.texas.gov — including full-text search, hierarchical navigation, and section-level text retrieval. The get_section_text endpoint returns the complete text of any statute section or chapter given a two-letter code and chapter identifier. Results include structured fields like text, chapter_title, code, and section, making it straightforward to build legal-research or compliance tools on top of Texas law.

Code and Chapter Navigation

The list_codes endpoint returns the complete set of available Texas statute codes — each with a code abbreviation (e.g. PE for Penal Code, CN for the Texas Constitution, FA for Family Code), a code_id, and a human-readable name. That two-letter code is the key input for all other endpoints. list_chapters takes a code and returns every chapter or constitutional article within it, including a value field (format: hid.ahid, e.g. 61952.53300) needed by list_sections and a url_key (format: CODE.NUMBER, e.g. PE.1) needed by get_section_text.

Section Enumeration and Text Retrieval

Once you have a chapter, list_sections returns every section within it — each with a title, value, and section_number. Feed that section_number into get_section_text alongside the url_key-format chapter parameter to retrieve the exact statute text. If you omit the section parameter, get_section_text returns the full chapter text. The response includes the text string, chapter_title, code, and section (or null when the full chapter is returned).

Full-Text Search

The search_statutes endpoint accepts a required query string and an optional code filter (use a two-letter code to narrow results to a single statute, or omit — or pass ZZ — to search all codes). Results are paginated at up to 10 per page via the page parameter. Each result object includes a title, document_code, and doc_viewer_url pointing to the source document, alongside total_results and the echo of code, page, and query.

Coverage Scope

The API covers all codes listed on statutes.capitol.texas.gov, including both codified statutes and the Texas Constitution. Navigation follows the official hierarchy: code → chapter/article → section. Content reflects what the official site publishes; historical versions and session-law archives outside that hierarchy are not exposed through these endpoints.

Reliability & maintenanceVerified

The statutes.capitol.texas.gov API is a managed, monitored endpoint for statutes.capitol.texas.gov — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when statutes.capitol.texas.gov changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official statutes.capitol.texas.gov API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
2h ago
Latest check
5/5 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a Texas legal research tool that lets users search statutes by keyword and drill into specific sections
  • Automate compliance checks by programmatically retrieving sections of the Texas Business & Commerce Code
  • Populate a legal-reference database with all chapters and sections across every Texas statute code
  • Cross-reference Family Code sections in a family-law practice management application
  • Generate plain-language summaries of specific statute sections by feeding text output to an LLM
  • Monitor changes to specific Penal Code sections by periodically fetching section text and diffing results
  • Build a Texas Constitution reference app navigating articles and sections via list_chapters and get_section_text
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000250 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does statutes.capitol.texas.gov have an official developer API?+
The Texas Legislature Online provides some data resources at tlo.texas.gov, but statutes.capitol.texas.gov does not publish a documented public REST API for statute text and search. This Parse API provides structured programmatic access to that content.
How does the search endpoint handle scope — can I search within a single code?+
search_statutes accepts an optional code parameter. Pass a two-letter code (e.g. PE for Penal Code, FA for Family Code) to restrict results to that code. Omitting code or passing ZZ searches across all available codes. Results are paginated at 10 per page using the page parameter, and the response includes total_results so you can calculate the full page count.
What is the difference between the `chapter_value` and `url_key` fields from `list_chapters`?+
chapter_value is a numeric dotted identifier (e.g. 61952.53300) used as the chapter_value input to list_sections. url_key is a human-readable string in CODE.NUMBER format (e.g. PE.1) used as the chapter input to get_section_text. They reference the same chapter but serve different endpoints.
Does the API expose historical or session-law versions of statutes?+
Not currently. The API returns current statute text as published on statutes.capitol.texas.gov; it does not expose prior session-law versions, effective-date history, or amendment tracking. You can fork this API on Parse and revise it to add an endpoint targeting historical session-law archives if that data becomes accessible.
Are annotations, case citations, or attorney general opinions returned with section text?+
Not currently. The get_section_text endpoint returns the text of the statute itself along with chapter_title, code, and section — it does not include judicial annotations, case law citations, or AG opinion cross-references. You can fork this API on Parse and revise it to add an endpoint that retrieves annotated content if a suitable source is available.
Page content last updated . Spec covers 5 endpoints from statutes.capitol.texas.gov.
Related APIs in Government PublicSee all →
api.nasa.gov API
Access NASA's suite of open data APIs — including the Astronomy Picture of the Day, Near Earth Object tracking, DONKI space weather events, EPIC Earth imagery, Mars weather, the NASA Image and Video Library, the Exoplanet Archive, and EONET natural events.
sec.gov API
Search for publicly traded companies and instantly access their SEC filings with details like filing type, date, description, and accession numbers. Find the regulatory documents you need to research company financial information and compliance records.
usaspending.gov API
usaspending.gov API
companieshouse.gov.uk API
Search for UK companies and officers, then access detailed information including company profiles, filing history, charges, and officers with significant control. Get comprehensive corporate records and appointment details all in one place.
mars.nasa.gov API
Explore real-time images, weather data, and location tracking from NASA's Perseverance and Curiosity rovers on Mars, while discovering mission details, rock sample findings, and the latest news from the Mars Exploration Program. Access rover photos, scientific discoveries, and multimedia content to stay updated on current Mars exploration activities.
find-and-update.company-information.service.gov.uk API
Search and access detailed information about UK companies registered at Companies House, including company profiles, filing histories, officers, and financial charges. Filter companies by name, status, type, SIC code, and more.
capitol.texas.gov API
Search and monitor Texas Legislature bills, track their progress through legislative stages, and retrieve detailed action histories. Look up legislator contact information, district details, committee assignments, and full committee membership rosters.
eur-lex.europa.eu API
Access and explore the complete collection of European Union laws, regulations, and Official Journal publications through a comprehensive database that lets you search documents, retrieve full texts, summaries, and metadata, and track legislative procedures and national implementations. Find exactly what you need with detailed search capabilities and get detailed information about how EU laws are transposed into national legislation.