API

HTTP MethodPOST
API URLhttps://buythefans.com/api/v2
API KeyGet an API key on the Account page
Response formatJSON

Service list

ParametersDescription
keyYour API key
actionservices
Provider request failed (HTTP 401): {"error":"Invalid API key"}
No services available from provider or failed to fetch — see the example JSON below.
Example response
[
    {
        "service": 1,
        "name": "Followers",
        "type": "Default",
        "category": "First Category",
        "rate": "0.90",
        "min": "50",
        "max": "10000",
        "refill": true,
        "cancel": true
    },
    {
        "service": 2,
        "name": "Comments",
        "type": "Custom Comments",
        "category": "Second Category",
        "rate": "8",
        "min": "10",
        "max": "1500",
        "refill": false,
        "cancel": true
    }
]
Note: Do not publish your API key. Providers expect each reseller / user to use their own API key.

Integration examples

PHP (cURL)
// Replace YOUR_API_KEY and set service/link/quantity as needed
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://buythefans.com/api/v2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
  "key" => "YOUR_API_KEY",
  "action" => "add",
  "service" => "1",
  "link" => "https://example.com/post",
  "quantity" => "100"
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
JavaScript (fetch)
// Use from server-side or CORS-enabled environment
fetch("https://buythefans.com/api/v2", {
  method: "POST",
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
  body: new URLSearchParams({
    key: "YOUR_API_KEY",
    action: "add",
    service: "1",
    link: "https://example.com/post",
    quantity: "100"
  })
})
.then(r => r.json())
.then(console.log)
.catch(console.error);
The examples intentionally use `YOUR_API_KEY` placeholder. Do not embed a live key in public client-side code. Best practice: call provider API from your server and keep the key secret.