OpenLaws Laws API

Laws represent a specific law type in a Jurisdiction. For example, Code of Federal Regulations belongs to the FED Jurisdiction and is represented by the law_key `FED-CFR`. Florida Statutes belongs to the FL Jurisdiction and is represented by the law_key `FL-STAT`. Note that case law and case opinions are represented as Opinions that belong to Courts and Jurisdictions rather than Laws.

OpenAPI Specification

openlaws-laws-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: OpenLaws API Documentation Courts Laws API
  version: 1.0.4
  description: OpenLaws Legal Data API
  contact:
    name: OpenLaws PBC
    url: https://openlaws.us/api
    email: team@openlaws.us
  license:
    name: Commercial
    url: https://openlaws.us/terms
servers:
- url: https://api.openlaws.us
security:
- bearerAuth: []
tags:
- name: Laws
  description: Laws represent a specific law type in a Jurisdiction. For example, Code of Federal Regulations belongs to the FED Jurisdiction and is represented by the law_key `FED-CFR`. Florida Statutes belongs to the FL Jurisdiction and is represented by the law_key `FL-STAT`. Note that case law and case opinions are represented as Opinions that belong to Courts and Jurisdictions rather than Laws.
paths:
  /api/v1/jurisdictions/{jurisdiction_key}/laws:
    get:
      summary: Get Laws by Jurisdiction
      description: Jurisdictions, i.e., California, Texas, Federal, contain many laws, e.g.,  statutes, regulations, court rules, and a constitution.
      tags:
      - Laws
      parameters:
      - $ref: '#/components/parameters/jurisdictionKeyParam'
      responses:
        '200':
          $ref: '#/components/responses/okArrayOfLaws'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
      operationId: getLawsByJurisdiction
  /api/v1/laws:
    get:
      summary: Get all Laws
      description: Laws in OpenLaws represent statutes, rules and regulations, and constitutions
      tags:
      - Laws
      responses:
        '200':
          $ref: '#/components/responses/okArrayOfLaws'
        '401':
          $ref: '#/components/responses/unauthorized'
      operationId: getLaws
components:
  responses:
    notFound:
      description: 404 Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    okArrayOfLaws:
      description: Array of Laws
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/Law'
    unauthorized:
      description: 401 Unauthorized. Please check your API Bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Law:
      type: object
      description: Laws represent one type of codified or administrative law for a specific Jurisdiction. Laws contain Divisions. Please see the Court and Opinion schemas for case law.
      properties:
        key:
          type: string
          example: CA-RR
          description: OpenLaws identifier for the Law.
        jurisdiction_key:
          type: string
          example: CA
          description: State or province when applicable.
        state:
          type: string
          example: CA
          description: (Deprecated. Use `jurisdiction` instead.) State or province when applicable.
        law_type:
          type: string
          example: regulations
          description: Type of Law, including statutes, rules, regulations, court rules, constitution, case law
        name:
          type: string
          example: California Code of Regulations
          description: Jurisdiction's name for the Law
        aliases:
          type:
          - string
          - 'null'
          example: null
        features:
          type: array
          items:
            $ref: '#/components/schemas/LawFeature'
          description: For future use.
      required:
      - key
      - jurisdiction_key
      - law_type
    LawFeature:
      description: Describes whether a Law has a type of data, e.g., rich text content, formatted tables.
      type: object
      properties:
        name:
          type: string
        available:
          type: boolean
    Error:
      description: RFC9457 Problem Details
      type: object
      properties:
        status:
          type: integer
          example: 404
        title:
          type: string
        instance:
          type: string
        type:
          type: string
        details:
          type: string
        errors:
          type: array
          items:
            type: string
      required:
      - status
      - title
  parameters:
    jurisdictionKeyParam:
      name: jurisdiction_key
      in: path
      required: true
      schema:
        type: string
        example: FED
      description: Two to three letter Jurisdiction Key. `FED` for federal and generally, the postal abbreviation for most U.S. states and territories.
  securitySchemes:
    bearerAuth:
      description: Authenticate API requests via a bearer token
      type: http
      scheme: bearer
      bearerFormat: JWT
x-ext-urls: {}