REST API Documentation
Integrate accessibility checking into your applications with our REST API
API Overview
The EAA Compliance Checker provides a simple REST API for automated accessibility analysis. Send website URLs and receive comprehensive WCAG 2.1 AA compliance reports in JSON format.
Base URL
https://eea.pliki.ai/
Format
JSON RESTAuthentication
Accessibility Check Endpoint
/check
Description
Analyzes a website for accessibility compliance against WCAG 2.1 AA standards as required by the European Accessibility Act.
Request Headers
Content-Type: application/json
Request Body
{
"url": "https://example.com"
}
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
url |
string | Required | Website URL to analyze (protocol optional - https:// will be added if missing) |
Response Format
{
"overall_score": 85,
"url": "https://example.com",
"error": false,
"timestamp": null,
"summary": {
"compliance_level": "High Compliance",
"passed_checks": 7,
"total_checks": 10,
"priority_issues": ["Color Contrast", "ARIA Implementation"]
},
"checks": {
"images": {
"name": "Image Alternative Text",
"score": 90,
"passed": true,
"wcag_reference": "WCAG 2.1 AA - 1.1.1",
"message": "4 of 4 images have proper alt text",
"details": {
"total_images": 4,
"images_with_alt": 4,
"missing_alt": 0,
"decorative_images": 0,
"complex_images": 0
}
},
"headings": {
"name": "Heading Structure",
"score": 100,
"passed": true,
"wcag_reference": "WCAG 2.1 AA - 1.3.1, 2.4.6",
"message": "Proper heading hierarchy found",
"details": {
"total_headings": 6,
"h1_count": 1,
"hierarchy_issues": []
}
}
}
}
Error Response
{
"error": true,
"message": "Failed to analyze website: Connection timeout"
}
Example Request
Here's a real example analyzing Google's homepage for accessibility compliance:
Request
POST https://eea.pliki.ai/check
Content-Type: application/json
{
"url": "www.google.com"
}
Expected Response
This request will analyze Google's homepage and return a comprehensive accessibility report with scores for images, headings, landmarks, forms, and other WCAG 2.1 AA compliance factors.
Code Examples
curl -X POST https://eea.pliki.ai/check \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'
async function checkAccessibility(url) {
const response = await fetch('https://eea.pliki.ai/check', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ url: url })
});
const result = await response.json();
if (result.error) {
console.error('Error:', result.message);
} else {
console.log('Score:', result.overall_score);
console.log('Compliance:', result.summary.compliance_level);
}
}
// Usage
checkAccessibility('https://example.com');
import requests
import json
def check_accessibility(url):
api_url = 'https://eea.pliki.ai/check'
payload = {'url': url}
response = requests.post(
api_url,
headers={'Content-Type': 'application/json'},
json=payload
)
result = response.json()
if result.get('error'):
print(f"Error: {result.get('message')}")
else:
print(f"Score: {result['overall_score']}")
print(f"Compliance: {result['summary']['compliance_level']}")
return result
# Usage
result = check_accessibility('https://example.com')
const https = require('https');
function checkAccessibility(url) {
const data = JSON.stringify({ url: url });
const options = {
hostname: 'eea.pliki.ai',
port: 443,
path: '/check',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': data.length
}
};
const req = https.request(options, (res) => {
let body = '';
res.on('data', (chunk) => {
body += chunk;
});
res.on('end', () => {
const result = JSON.parse(body);
if (result.error) {
console.error('Error:', result.message);
} else {
console.log('Score:', result.overall_score);
console.log('Compliance:', result.summary.compliance_level);
}
});
});
req.write(data);
req.end();
}
// Usage
checkAccessibility('https://example.com');
Response Details
Accessibility Checks Performed
Check | WCAG Reference | Description |
---|---|---|
images |
1.1.1 | Validates image alternative text |
headings |
1.3.1, 2.4.6 | Checks heading structure hierarchy |
landmarks |
1.3.1 | Verifies semantic landmark elements |
links |
2.4.4 | Ensures descriptive link text |
forms |
1.3.1, 3.3.2 | Validates form accessibility |
aria |
4.1.2 | Checks ARIA implementation |
color_contrast |
1.4.3 | Basic color contrast analysis |
semantic_markup |
1.3.1 | Validates semantic HTML usage |
keyboard_navigation |
2.1.1 | Checks keyboard accessibility |
page_structure |
2.4.1, 3.1.1 | Validates overall page structure |
Compliance Levels
Rate Limits & Usage
Response Times
- Simple websites: 2-5 seconds
- Complex websites: 5-15 seconds
- Large websites: Up to 30 seconds
Best Practices
- Include proper error handling for network timeouts
- Cache results when possible to reduce API calls
- Use meaningful user agents in your requests
- Handle rate limiting gracefully with exponential backoff
Support & Contact
For API support, integration questions, or to report issues, please contact us through our main website.