{"id":44903,"library":"eyecite","title":"Eyecite","description":"A tool for extracting legal citations from text strings. Version 2.7.6 supports Python >=3.10, with a focus on US legal materials. Released irregularly by the Free Law Project.","status":"active","version":"2.7.6","language":"python","source_language":"en","source_url":"https://github.com/freelawproject/eyecite","tags":["legal citations","legal tech","text extraction"],"install":[{"cmd":"pip install eyecite","lang":"bash","label":"latest"}],"dependencies":[{"reason":"Provides the list of legal reporters for citation matching.","package":"reporters-db","optional":false}],"imports":[{"note":"get_citations is a top-level function, not in a submodule.","wrong":"from eyecite.eyecite import get_citations","symbol":"get_citations","correct":"from eyecite import get_citations"},{"note":"Direct import works, but note the function changed behavior in v2.0.","wrong":"","symbol":"resolve_citations","correct":"from eyecite import resolve_citations"},{"note":"annotate is also top-level.","wrong":"","symbol":"annotate","correct":"from eyecite import annotate"}],"quickstart":{"code":"from eyecite import get_citations\n\ntext = \"See e.g., Roe v. Wade, 410 U.S. 113 (1973).\"\ncitations = get_citations(text)\nfor cite in citations:\n    print(cite)  # <Citation: 410 U.S. 113>","lang":"python","description":"Extract all citations from a string. Returns a list of Citation objects."},"warnings":[{"fix":"Access citation text via str(cite) or cite.citation.","message":"In version 2.0, `get_citations` returns a list of `Citation` objects instead of strings. Code relying on string output will break.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Preprocess text as needed (e.g., remove non-citation markup).","message":"The `clean_text` parameter was removed in 2.0. Text cleaning must be done manually before calling `get_citations`.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Import functions directly from eyecite.","message":"The `eyecite.helpers` module is deprecated and will be removed in a future version. Use `eyecite` top-level functions instead.","severity":"deprecated","affected_versions":">=2.6.0"},{"fix":"Use the `index` attribute on Citation objects to get the start position.","message":"Citations are parsed in the order they are found, not by occurrence in text. Sorting by position may need manual intervention.","severity":"gotcha","affected_versions":"all"},{"fix":"For non-US citations, consider alternative libraries or custom reporters.","message":"The library does not handle all foreign citation formats. Only US legal reporters are fully supported.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2.7.6':12 '3.10':15 'citat':7,31 'extract':5,35 'eyecit':1 'focus':18 'free':27 'irregular':24 'law':28 'legal':6,21,30,32 'materi':22 'project':29 'python':14 'releas':23 'string':10 'support':13 'tech':33 'text':9,34 'tool':3 'us':20 'version':11","created_at":"2026-06-07T12:52:24.625422+00:00","updated_at":"2026-06-07T12:52:24.625422+00:00","problems":[{"fix":"Upgrade eyecite: pip install --upgrade eyecite","cause":"Installed version <2.0 where `get_citations` was in a submodule or named differently.","error":"ImportError: cannot import name 'get_citations' from 'eyecite'"},{"fix":"Update code: for cite in citations: print(cite.citation)","cause":"Old code assumed `get_citations` returns strings, but it returns objects.","error":"AttributeError: 'list' object has no attribute 'cite'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/freelawproject/eyecite","github":"https://github.com/freelawproject/eyecite","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["search"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}