Access our comprehensive bookstore database with simple pay-per-use pricing
Sign up for API access to get your API key instantly. No approval process required.
Use your API key to make requests to our endpoints:
curl -H "Authorization: Bearer YOUR_API_KEY" \\
https://bookshopfinder.co.uk/api/bookstoresSearch bookstores:
curl -H "Authorization: Bearer YOUR_API_KEY" \\
"https://bookshopfinder.co.uk/api/bookstores/search?q=london"Get bookstores by city:
curl -H "Authorization: Bearer YOUR_API_KEY" \\
https://bookshopfinder.co.uk/api/bookstores/city/LondonGet bookstores by tags:
curl -H "Authorization: Bearer YOUR_API_KEY" \\
https://bookshopfinder.co.uk/api/bookstores/tag/fiction,coffeeTrack your API usage and charges through the response headers or build a dashboard using our usage endpoint.
/api/bookstoresGet all bookstores
/api/bookstores/city/{city}Get bookstores by city
/api/bookstores/tag/{tags}Get bookstores by tag(s) - supports comma-separated tags
/api/bookstores/search?q={query}Search bookstores by name, city, or address
/api/bookstores/{slug}Get a specific bookstore by slug
/api/citiesGet all cities with bookstore counts
/api/cities/popular?max={number}Get popular cities (default max: 15, max allowed: 100)
All API requests require authentication using an API key. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYKeep your API key secure and never expose it in client-side code.
Every API response includes usage information in the headers:
X-Usage-Total: 45
X-Usage-Charge: 0.001
X-Usage-Free-Limit: 100
X-RateLimit-Remaining: 55Here's an example response from the /api/bookstores endpoint:
{
"data": {
"bookstores": [
{
"_id": "abc123",
"name": "The Literary Cafe",
"slug": {
"current": "the-literary-cafe"
},
"city": "London",
"address": "123 Book Street",
"postcode": "SW1A 1AA",
"phone": "+44 20 7946 0958",
"email": "hello@literarycafe.com",
"links": [
{
"_key": "website",
"title": "Website",
"url": "https://literarycafe.com",
"type": "website"
}
],
"description": "A cozy independent bookshop and cafe...",
"tags": ["fiction", "coffee", "events"],
"location": {
"lat": 51.5074,
"lng": -0.1278
},
"_createdAt": "2023-01-01T00:00:00Z",
"_updatedAt": "2023-01-01T00:00:00Z"
}
]
},
"meta": {
"total": 1,
"endpoint": "/api/bookstores",
"charged": false,
"chargeAmount": 0
}
}The API uses standard HTTP status codes and returns error details in JSON format:
{
"error": {
"message": "Invalid API key",
"code": "INVALID_API_KEY",
"status": 401
}
}Need help with the API? We're here to help: