Skip to main content
The Law4Devs API is fully described in an OpenAPI 3.0.3 specification. You can use this to import the API into your preferred HTTP client, generate typed SDK code, or run automated contract tests.

Access the Spec

FormatURL
JSONhttps://api.law4devs.eu/v1/openapi.json
# Download the JSON spec
curl https://api.law4devs.eu/v1/openapi.json -o law4devs-openapi.json

Import into API Clients

  1. Open Postman and click Import
  2. Select Link and paste https://api.law4devs.eu/v1/openapi.json
  3. Click Import — all endpoints appear as a new collection
  4. Set the X-API-Key variable in the collection variables to your API key

Code Generation

Use openapi-generator to generate a typed client in any language from the spec:
# Generate a Python client
openapi-generator generate \
  -i https://api.law4devs.eu/v1/openapi.json \
  -g python \
  -o ./generated-client

# Generate a Go client
openapi-generator generate \
  -i https://api.law4devs.eu/v1/openapi.json \
  -g go \
  -o ./generated-client
The official SDKs (Python, TypeScript, PHP) are hand-crafted and include features like auto-pagination and retry logic that generated clients do not provide. Use code generation only if your language isn’t covered by an official SDK.

Spec Details

PropertyValue
Spec versionOpenAPI 3.0.3
API version1.0
Total endpoints21
AuthenticationX-API-Key header
Response formatJSON
PaginationCursor-based with page and per_page

Versioning

The current API version is 1.0. Every response includes the X-API-Version header so your application can detect version changes programmatically. Breaking changes will increment the major version and be announced in the Changelog.