List Regulations
GET
/api/v1/regulations
Get a paginated list of regulations and regulatory frameworks with optional search and country filtering. Includes data protection laws, identity regulations, and digital governance frameworks.
Request
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page |
integer | No | 1 | Page number (1-indexed) |
per_page |
integer | No | 20 | Results per page (1-100) |
q |
string | No | - | Search text for regulation titles |
country |
string | No | - | Filter by country code (e.g., "US", "CH") |
Example Requests
bash
# Get first page of regulations
curl -X GET "https://www.weboftrust.org/api/v1/regulations" \
-H "X-API-Key: YOUR_API_KEY"
# Search for GDPR-related regulations
curl -X GET "https://www.weboftrust.org/api/v1/regulations?q=GDPR" \
-H "X-API-Key: YOUR_API_KEY"
# Get regulations from the European Union
curl -X GET "https://www.weboftrust.org/api/v1/regulations?country=EU" \
-H "X-API-Key: YOUR_API_KEY"
# Get page 2 with 50 results
curl -X GET "https://www.weboftrust.org/api/v1/regulations?page=2&per_page=50" \
-H "X-API-Key: YOUR_API_KEY"
Response
Success Response (200 OK)
Response Schema
typescript
interface RegulationListResponse {
data: RegulationSummary[];
pagination: {
page: number; // Current page (1-indexed)
per_page: number; // Items per page
total: number; // Total number of regulations
total_pages: number; // Total number of pages
};
}
interface RegulationSummary {
id: number;
title: string;
official_name?: string; // Full legal name
url?: string; // Official regulation URL
country?: { // Originating country/region
id: number;
name: string;
code: string;
};
stats: {
total_links: number; // Number of projects following this regulation
};
}
Example Response
json
{
"data": [
{
"id": 50,
"title": "EU GDPR - EU General Data Protection Regulation",
"official_name": "Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 (General Data Protection Regulation)",
"url": "https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A02016R0679-20160504",
"country": null,
"stats": {
"total_links": 179
}
},
{
"id": 1,
"title": "eIDAS - electronic IDentification, Authentication and trust Services Regulation",
"official_name": "Regulation (EU) No 910/2014 of the European Parliament and of the Council of 23 July 2014",
"url": "https://digital-strategy.ec.europa.eu/en/policies/eidas-regulation",
"country": null,
"stats": {
"total_links": 66
}
},
{
"id": 23,
"title": "California Consumer Privacy Act (CCPA)",
"official_name": "California Consumer Privacy Act of 2018",
"url": "https://oag.ca.gov/privacy/ccpa",
"country": {
"id": 197,
"name": "United States of America",
"code": "US"
},
"stats": {
"total_links": 42
}
}
],
"pagination": {
"page": 1,
"per_page": 3,
"total": 46,
"total_pages": 16
}
}
Error Responses
400 Bad Request
Invalid query parameters
json
{
"error": {
"code": "invalid_parameter",
"message": "Invalid page parameter"
}
}
500 Internal Server Error
json
{
"error": {
"code": "internal_error",
"message": "Failed to fetch regulations"
}
}
Field Descriptions
- title: Common name or abbreviation of the regulation
- official_name: Full legal title as published
- url: Link to official legal text or government resource
- country: Jurisdiction where regulation applies (null for international)
- stats.total_links: Number of projects claiming compliance
Country Codes
Use ISO 3166-1 alpha-2 codes:
EU- European Union (special case)US- United StatesGB- United KingdomCA- CanadaAU- AustraliaSG- SingaporeJP- JapanBR- Brazil
Performance Notes
- Results sorted by adoption (total_links) by default
- Country filter uses exact match
- Search operates on titles and official names
- Results are cached for performance
Related Endpoints
- GET /regulations/{id} - Get detailed information about a specific regulation
- GET /projects/{id} - Get project details including regulatory compliance
- GET /countries - Get countries with regulation counts
- GET /search - Search across all resources