Access library hours data programmatically with our RESTful API
The Library Hours 24 API provides programmatic access to our comprehensive library database. With our API, you can:
All API responses are returned in JSON format with UTF-8 encoding.
The Library Hours 24 API uses API keys to authenticate requests. You can request an API key by contacting us.
Include your API key in the request header:
Or as a query parameter:
Retrieve a list of all libraries with pagination support.
Parameter | Type | Description | Required |
---|---|---|---|
page |
integer | Page number (default: 1) | Optional |
limit |
integer | Results per page (max: 100, default: 20) | Optional |
country |
string | Filter by country code (e.g., US, UK, FR) | Optional |
type |
string | Filter by library type (public, university, national) | Optional |
Get detailed information about a specific library.
Parameter | Type | Description | Required |
---|---|---|---|
id |
string | Library ID | Required |
Search for libraries by name or location.
Parameter | Type | Description | Required |
---|---|---|---|
q |
string | Search query | Required |
lat |
float | Latitude for location-based search | Optional |
lng |
float | Longitude for location-based search | Optional |
radius |
integer | Search radius in kilometers (default: 10) | Optional |
Get real-time open/closed status for a library.
Rate limit information is included in response headers:
The API uses standard HTTP status codes to indicate success or failure.
Code | Status | Description |
---|---|---|
200 |
OK | Request successful |
400 |
Bad Request | Invalid request parameters |
401 |
Unauthorized | Invalid or missing API key |
404 |
Not Found | Resource not found |
429 |
Too Many Requests | Rate limit exceeded |
500 |
Internal Server Error | Server error |
We provide official SDKs for popular programming languages to make integration easier.
Official npm package
Official PyPI package
Composer package
RubyGems package
Contact our developer support team at amywerson@gmail.com or visit our contact page.