Developer API
Free REST API for coin flips. Simple, fast, and reliable. Perfect for apps, games, and automation.
Quick Start
Get started in seconds with our simple API
Base URL
https://flipacoinfree.com/api
Simple GET Request
curl https://flipacoinfree.com/api/flip
Response
{
"success": true,
"data": {
"result": "heads",
"timestamp": "2025-01-10T12:00:00.000Z"
}
}
API Endpoints
GET
/api/flip
Flip a single coin
Example Request
curl https://flipacoinfree.com/api/flip
Response
{
"success": true,
"data": {
"result": "heads",
"timestamp": "2025-01-10T12:00:00.000Z"
}
}
POST
/api/flip
Flip multiple coins with optional weighting
Request Body
{
"count": 10, // Number of flips (1-1000)
"weighted": false, // Use weighted probability
"probability": 50 // Heads probability (0-100)
}
Example Request
curl -X POST https://flipacoinfree.com/api/flip \
-H "Content-Type: application/json" \
-d '{"count": 10}'
Response
{
"success": true,
"data": {
"flips": ["heads", "tails", "heads", ...],
"count": 10,
"heads": 6,
"tails": 4,
"headsPercent": "60.00",
"tailsPercent": "40.00",
"timestamp": "2025-01-10T12:00:00.000Z"
}
}
Code Examples
// Single flip
const response = await fetch('https://flipacoinfree.com/api/flip');
const data = await response.json();
console.log(data.data.result); // "heads" or "tails"
// Multiple flips
const multiResponse = await fetch('https://flipacoinfree.com/api/flip', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ count: 10 })
});
const multiData = await multiResponse.json();
console.log(multiData.data.flips);
Rate Limits
Fair usage policy for API requests
100
Requests per minute (free tier)
10,000
Requests per day (free tier)
Need higher limits? Contact us for enterprise pricing and dedicated infrastructure.