Skip to main content

CiteURL Logo

pytest GitHub issues GitHub license PyPI

CiteURL is an extensible tool that parses legal citations and makes links to websites where you can read the relevant law for free. It can be used to quickly look up a reference, or to insert a hyperlink for every long- or short-form citation found in a longer text.

If you want to quickly try it out, it's available as a web app at citation.link.


Here's a sample of the links CiteURL can make:

Federal law provides that courts should award prevailing civil rights plaintiffs reasonable attorneys fees, 42 USC § 1988(b), and, by discretion, expert fees, id. at (c). This is because the importance of civil rights litigation cannot be measured by a damages judgment. See Riverside v. Rivera, 477 U.S. 561 (1986). But Evans v. Jeff D. upheld a settlement where the plaintiffs got everything they wanted, on condition that they waive attorneys' fees. 475 U.S. 717 (1986). This ruling lets savvy defendants create a wedge between plaintiffs and their attorneys, discouraging civil rights suits and undermining the court's logic in Riverside, 477 U.S. at 574-78.


By default, CiteURL supports Bluebook-style citations to over 130 sources of U.S. law, including:

  • most reported state and federal court opinions
  • the U.S. Code and Code of Federal Regulations
  • the U.S. Constitution and all state constitutions
  • the codified laws for every state and territory except Arkansas, Georgia, Guam, and Puerto Rico.

You can also add more sources of law by writing your own citation templates in YAML format.

Installation

To install just enough to make CiteURL work, run this command:

python3 -m pip install citeurl

Substitute citeurl[full] for citeurl if you want to install the optional dependencies flask and appdirs, necessary for hosting citeurl as a website and reading custom templates from the user's home directory.

Usage

CiteURL provides four command-line tools:

  • citeurl process: Parse a text and insert an HTML hyperlink for every citation it contains, including shortform citations.
  • citeurl lookup: Look up a single citation and display information about it.
  • citeurl host: Host an instance of CiteURL as a web app like citation.link.
  • citeurl makejs: Export an instance of CiteURL's lookup feature as JavaScript or a static web page. More info is available here.

Each command has its own command-line arguments you can view with the -h option. They all share the -t option, which allows you to load a list of custom citation templates in YAML form.

Here are a few common use cases:

# Process a court opinion and output a version where each citation is hyperlinked:
citeurl process -i INPUT_FILE.html -o OUTPUT_FILE.html
# Look up a single citation and open it directly in a browser
citeurl lookup "42 USC 1983" -b
# List the top ten authorities cited in a text, from most citations to least:
cat INPUT_FILE.html | citeurl process -a 10
# Host a lookup tool with custom templates, and serve it on the local network:
citeurl host -t PATH_TO_YOUR_TEMPLATES.YAML -s

CiteURL is also available in a few other forms besides the command-line tool:

Credits

Many thanks to these websites, which CiteURL's default templates frequently link to:

Release files for citeurl 12.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for citeurl 12.0.4
File Size Uploaded
citeurl-12.0.4.tar.gz 78.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for citeurl 12.0.4
File Interpreter ABI Platform
citeurl-12.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 162.6 kB

Release files / citeurl-12.0.4.tar.gz

Download URL citeurl-12.0.4.tar.gz
Size 78.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c3e8a1940e95d3f42778d7f523ae1d9f2e03805cc44d0a6d0457d312eb45faad
BLAKE2b-256 checksum
How to use checksums
bd9362e1dd53b86803ed660e3c442cee36b6fc26bd186f7224c3d861c1318567
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / citeurl-12.0.4-py3-none-any.whl

Download URL citeurl-12.0.4-py3-none-any.whl
Size 84.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0bb77722fc112f61a4f00768d993692e53b8eecc158a4f002c69fc4c66f2e9c2
BLAKE2b-256 checksum
How to use checksums
6b129e8ba28db0bdec30cad8795a674bc524264aa60a17d52c27b488bcd21c6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

12.0.4 This release

2 release files

12.0.3

2 release files

12.0.2

2 release files

11.5.1

2 release files

11.5.0

2 release files

11.4.3

2 release files

11.3.2

2 release files

11.3.1

2 release files

11.3.0

2 release files

11.0.6

2 release files

11.0.5

2 release files

11.0.4

2 release files

11.0.3

2 release files

11.0.2

2 release files

11.0.1

2 release files

11.0.0

2 release files

10.0.7

2 release files

10.0.6

2 release files

10.0.5

2 release files

10.0.4

2 release files

10.0.3

2 release files

10.0.2

2 release files

10.0.1

2 release files

10.0.0

2 release files

9.0.2

2 release files

9.0.1

2 release files

9.0.0

2 release files

8.4.2

2 release files

8.4.1

2 release files

8.4.0

2 release files

8.3.9

2 release files

8.3.8

2 release files

8.3.7

2 release files

8.3.6

2 release files

8.3.5

2 release files

8.3.4

2 release files

8.3.3

2 release files

8.3.2

2 release files

8.3.1

2 release files

8.3.0

2 release files

8.2.4

2 release files

8.2.3

2 release files

8.2.2

2 release files

8.2.1

2 release files

8.2.0

2 release files

8.1.0

2 release files

8.0.0

2 release files

7.2.0

2 release files

7.1.6

2 release files

7.1.5

2 release files

7.1.4

2 release files

7.1.3

2 release files

7.1.2

2 release files

7.1.1

2 release files

7.1.0

2 release files

7.0.0

2 release files

6.0.1

2 release files

6.0.0

2 release files

5.0.3

2 release files

5.0.2

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.3.0

2 release files

4.2.1

2 release files

4.2.0

2 release files

4.1.21

2 release files

4.1.20

2 release files

4.1.12

2 release files

4.1.11

2 release files

4.1.10

2 release files

4.1.9

2 release files

4.1.8

2 release files

4.1.7

2 release files

4.1.6

2 release files

4.1.5

2 release files

4.1.4

2 release files

4.1.3

2 release files

4.1.2

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.9

2 release files

4.0.8

2 release files

4.0.7

2 release files

4.0.6

2 release files

4.0.5

2 release files

4.0.4

2 release files

4.0.3

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page