Downloads
The whole graph, free to use under CC BY 4.0. Best taken from GitHub, where it comes with the law texts it is built from and the checks that prove it.
The graph as published today: 41,051 triples, 1,116 provisions from 234 laws, judgments and guidelines in 48 jurisdictions.
Clone it from GitHub (recommended)
The repository is the graph's real home. A clone gives you more than any file below: the official law texts byte for byte, the annotated copies, the editorial TurtleTerse RDF Triple LanguageA W3C syntax for writing RDF as plain text, readable by people as well as programs; its files end in .ttl., the ontology with its SHACLShapes Constraint LanguageA W3C standard for rules about RDF data, such as 'every act has exactly one jurisdiction', checked by a program. shapes, the code that builds everything, and the tests. Run them and you have checked the graph yourself, instead of trusting a download.
git clone https://github.com/legalgraph-org/legalgraph.git
cd legalgraph
make install # the tools (needs uv)
make check # verify every law text, validate the graph, run the tests
make export # dist/legalgraph.{ttl,nt,jsonld}, built on your machine
make sparql # query it in your browser with Apache Jena Fuseki (needs Docker)If the graph is useful to you, star the repository: it is how others find the project, and how we see who relies on it. Corrections and questions are welcome there as issues.
The graph in Turtle
legalgraph.ttl · Turtle (text/turtle) · 3.3 MB
What is inside. Every jurisdiction, act, provision, quote, translation, source document, rule and case, with prefixes, grouped by resource.
What it is for. Read it, load it into rdflib, Apache Jena or Oxigraph, and query it with SPARQLSPARQL Protocol and RDF Query LanguageThe query language for RDF graphs: it finds every match of a pattern across the whole graph.. The format the graph is written in.
The graph in N-Triples
legalgraph.nt · N-Triples (application/n-triples) · 7.3 MB
What is inside. The same triples as the Turtle file, one per line, with full IRIs and no prefixes.
What it is for. Bulk-load it into a triple store, or process it line by line with grep, sort and diff: two versions compare line for line.
The graph in JSON-LD
legalgraph.jsonld · JSON-LDJSON for Linking DataRDF written as JSON: the whole graph, readable by any JSON tool, with its links intact. (application/ld+json) · 7.2 MB
What is inside. The same graph as JSONJavaScript Object NotationA simple text format for data, read by almost every programming language; the rules and citations downloads use it., each resource an object with its identifier and properties.
What it is for. Use it from JavaScript or any JSON tooling, without an RDFResource Description FrameworkThe W3C's model for data as a graph: every statement is a triple of subject, predicate and object, each named by a URL. library.
The ontology and vocabularies
legalgraph-ontology.ttl · Turtle (OWL, SKOSSimple Knowledge Organization SystemA W3C standard for vocabularies: concepts with labels in several languages, definitions and broader or narrower terms.) · 195 kB
What is inside. The classes and properties the graph uses (lgo:), and the controlled vocabularies (lgv:): information items, act types, review statuses.
What it is for. Understand what each property means, label concepts in English and other languages, and map the graph to your own model. The SHACL shapes the graph is checked against are in the repository.
Rules and the checklist
rules.json · JSON · 542 kB
What is inside. The rules for businesses, the conditions they apply under, each condition's yes/no question, and the example businesses with the rules they must get.
What it is for. Build a checklist into an article or a tool from the graph, instead of retyping it. The site's own checklist runs on this file.
Citations
citations.json · JSON · 784 kB
What is inside. Every identifier in the graph, with a SHA-256Secure Hash Algorithm, 256 bitsA fingerprint of a file: any change, even of one character, gives a completely different value. of its triples and the graph's version.
What it is for. Check in your build that every identifier you cite still exists, and see when what it says has changed.
One entry at a time
Every identifier is also an address. A browser gets the page; a program asking for Turtle gets that entry's triples:
curl -H "Accept: text/turtle" https://legalgraph.org/id/DE-DDG-s5-1Every page shows its own Turtle too. For the whole graph, use the files above rather than fetching every page.
The law texts
The official originals the graph is built from, with their SHA-256 and retrieval dates, are listed under Law texts, each with its file and our annotated copy. All of them are in the repository.
Licence and credit
The data and the ontology are licensed under CC BY 4.0: use them for anything, commercial included, and credit them, for example:
legalgraph by Aimix GmbH (https://aimix.io), licensed under CC BY 4.0.The code is MITMIT LicenseThe licence of legalgraph's code: a short, permissive licence that allows any use if the copyright notice is kept.. The law texts are official works and are not covered by our licences. The graph is research, not legal advice: the terms of use say what that means.