FOLIO API
The FOLIO API provides a robust and efficient way to interact with the Federated Open Legal Information Ontology (FOLIO) over HTTP. This API enables developers, researchers, and legal professionals to seamlessly integrate FOLIO into their applications and workflows, facilitating access to multiple comprehensive legal information standards through a unified interface.
By leveraging the FOLIO API, organizations can accelerate their adoption of multiple interoperable legal standards, streamline data science projects in the legal domain, and enhance interoperability across various legal information systems. The API was designed with FOLIO’s modular and federated approach in mind, allowing different systems and standards to communicate effectively while preserving their unique strengths.
Resource | Link |
---|---|
API Base URL | https://folio.openlegalstandard.org/ |
API Documentation | https://folio.openlegalstandard.org/docs |
OpenAPI Specification | https://folio.openlegalstandard.org/openapi.json |
GitHub Repository | https://github.com/alea-institute/folio-api |
Overview
The FOLIO API offers the following key features:
- Access to the entire FOLIO ontology
- Search functionality for classes by label or definition
- Retrieval of detailed class information
- Multiple output formats including JSON, JSON-LD, OWL XML, and Markdown
- CORS-enabled for cross-origin requests
- Open and free to use without authentication
Key Endpoints
Get Class Information
Retrieve detailed information about a specific FOLIO class.
GET /{class_id}
Example:
curl https://folio.openlegalstandard.org/R8pNPutX0TN6DlEqkyZuxSw
Search Classes
Search for FOLIO classes by prefix, label, or definition.
GET /search/prefix?query=Mich
Example:
curl https://folio.openlegalstandard.org/search/prefix?query=Mich
Get Class in Specific Format
Retrieve a FOLIO class in a specific format (JSON-LD, Markdown, OWL XML).
GET /{class_id}/{format}
Example:
curl https://folio.openlegalstandard.org/R8pNPutX0TN6DlEqkyZuxSw/jsonld
Using the API
The FOLIO API is designed to be simple to use. Here are some examples using Python and the httpx
library:
import httpx
# Get class information
response = httpx.get('https://folio.openlegalstandard.org/R8pNPutX0TN6DlEqkyZuxSw')
print(response.json())
# Search for classes
response = httpx.get('https://folio.openlegalstandard.org/search/prefix', params={'query': 'Mich'})
print(response.json())
# Get class in JSON-LD format
response = httpx.get('https://folio.openlegalstandard.org/R8pNPutX0TN6DlEqkyZuxSw/jsonld')
print(response.json())
API Documentation
For more detailed information about using the FOLIO API, please refer to the Swagger UI documentation.
Contributing
Contributions to the FOLIO API are welcome! If you’d like to contribute, please visit the GitHub repository for more information.
License
The FOLIO API is released under the MIT License. See the LICENSE file for details.
Support
If you encounter any issues or have questions about using the FOLIO API, please open an issue on GitHub or open a discussion topic on the FOLIO community forum.