Developer API

Legal Sources API for legislation, court decisions, official documents, and doctrine

Omnilex exposes a programmable search surface for legal sources with stable identifiers, grouped JSON responses, and citation-friendly metadata.

Overview

One endpoint for legal source discovery.

  • Search primary law, court decisions, commentary, official documents, and literature with one request.
  • Filter by jurisdiction, region, court, legal area, article, citation, language, and date.
  • Return JSON that is suitable for citations, links, internal tools, and LLM workflows.
  • Use the endpoint without authentication for public sources; restricted literature requires an authorized bearer token.

Coverage

Python

python
import json
from urllib.request import urlopen

API_BASE_URL = "https://api.omnilex.ai"

with urlopen(
    f"{API_BASE_URL}/sources/catalog",
    timeout=30,
) as response:
    catalog = json.load(response)

coverage = {
    source_family: {
        "count": sum(
            row["count"] for row in rows
        ),
        "jurisdictions": sorted(
            {
                row["jurisdiction"]
                for row in rows
                if row["jurisdiction"]
            }
        ),
        "regions": len(
            {
                (row["jurisdiction"], row["region"])
                for row in rows
            }
        ),
    }
    for source_family, rows in catalog.items()
}

print(json.dumps(coverage, indent=2))

API output

json
{
  "legislation": {
    "count": 64715,
    "jurisdictions": [
      "ch",
      "de",
      "eu",
      "li"
    ],
    "regions": 31
  },
  "courtDecisions": {
    "count": 1626858,
    "jurisdictions": [
      "at",
      "ch",
      "de",
      "li",
      "us"
    ],
    "regions": 55
  },
  "officialDocuments": {
    "count": 78224,
    "jurisdictions": [
      "ch"
    ],
    "regions": 1
  },
  "literature": {
    "count": 2549,
    "jurisdictions": [
      "ch"
    ],
    "regions": 1
  }
}

Playground

Request

Source types

Generated request

GET https://api.omnilex.ai/sources/search?query=employment+termination&searchMode=lexical&jurisdiction=ch&region=federal&sourceTypes=law%2Carticle%2Ccourt_decision%2Ccommentary%2Cofficial_document&limit=5&offset=0&includeTotal=true

Response

Run the request to preview grouped legal-source results.

Authentication is optional. Restricted literature is returned only when the request includes a valid bearer token with access to its publication.

Filters

0available filters, each source with unique metadata
querysearchModejurisdictionregionsourceTypeslanguagepreferredLanguagedocumentTypestatusnumberarticleNumbersourceIdcitationmarginalNumberauthorNameauthorCompanycourtchamberauthoritypublicationdocketNumberlegalAreadecisionTypelegalForceprocedureTypeoutcomeinstanceadoptionDateFromadoptionDateToeffectiveDateFromeffectiveDateTolastAmendmentDateFromlastAmendmentDateToexpirationDateFromexpirationDateTodateFromdateTodecisionDateFromdecisionDateTopublicationDateFrompublicationDateTorecentlyAddedlimitoffsetincludeTotal

Use cases