Tip Calculator API
Calculate tips and split bills fairly between any number of people.
Fast & Accurate
Get precise results instantly.
Easy Integration
Simple REST API with JSON response.
Developer Friendly
Clear docs and SDK examples.
Free to Start
1,000 free requests/month.
Endpoint
All requests should be made to the following endpoint:
GET https://api.tools.town/v1/calculators/tip Authentication
This endpoint requires an API Key. Include your API key in the request header.
Request Parameters
Send a GET request with query parameters.
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
bill | number | ✓ | Bill must be greater than zero. | 100 |
tipRate | number | ✓ | Tip rate must be between 0 and 100. | 100 |
people | number | ✓ | Must split between at least 1 person. | 100 |
Example Request
curl -G "https://api.tools.town/v1/calculators/tip" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "bill=100" \
--data-urlencode "tipRate=100" \
--data-urlencode "people=100" Example Response 200 OK
{
"success": true,
"data": {
"tipAmount": "0",
"total": "0",
"perPerson": "0",
"tipPerPerson": "0",
"billPerPerson": "0"
}
} Error Codes
| Code | Meaning |
|---|---|
| 400 | Bad Request — missing or invalid parameter |
| 401 | Unauthorized — API key missing or invalid |
| 429 | Rate limit exceeded — free tier: 1,000 requests/month |
| 500 | Internal Server Error — try again or contact support |