REST API
All endpoints of the findbytown REST API, with the base URL, the response format and pagination.
Base URL: https://findbytown.com/api/v1. Requests and responses are JSON. The full description is available as an OpenAPI 3.1 document.
| Endpoint | Description |
|---|---|
| GET /businesses | Search companies |
| GET /businesses/count | Count companies |
| GET /businesses/{id} | Get a company |
| GET /businesses/{id}/reveal | Check the cost of a reveal |
| POST /businesses/{id}/reveal | Reveal a company |
| GET /quota | Get your quota and limits |
| GET /categories | List categories and trades |
| GET /countries | List countries |
| GET /zones | List zones |
Responses
A successful response puts its content in data. A failed one has an error code, a message and a requestId, as described in Errors. Ids are always integers.
Pagination
GET /businesses takes page and perPage, and answers with page, perPage, total, maxPage and hasMore. A page holds at most 50 rows; if you ask for more, perPage in the response says what applied. Past maxPage you get an empty page with capped: true and total: null. To see more, narrow the search with a filter, for instance by zone.
Browsers
The REST API sends no CORS headers, so a web page on another site cannot call it. Call it from your server.