Skip to content
BATTLEFIELDCLANS.net

For developers

API

Pull your clan's live vote count into your own site, stream overlay or bot. Public, read-only, and no key required — just be reasonable with how often you ask.

Clan votes

Returns a clan's current vote count, all-time total and rank. Responses allow cross-origin requests, so this works straight from a browser with no proxy.

GET https://battlefieldclans.net/api/clans/{slug}/votes

slugis the last part of your clan's profile URL — for https://battlefieldclans.net/clans/7th-cavalry-gaming the slug is 7th-cavalry-gaming.

Response

{
  "slug": "7th-cavalry-gaming",
  "name": "7th Cavalry Gaming",
  "tag": "[7CAV]",
  "game": "Battlefield 6",
  "votes": 1840,
  "allTimeVotes": 24193,
  "rank": 1,
  "voteWindowDays": 9,
  "votesPeriodStart": "2026-07-21 00:00:00",
  "verified": true,
  "members": 142,
  "views": 21500,
  "url": "https://battlefieldclans.net/clans/7th-cavalry-gaming",
  "badge": "https://battlefieldclans.net/api/clans/7th-cavalry-gaming/badge",
  "fetchedAt": "2026-07-27T17:20:00.000Z"
}
FieldTypeMeaning
votesnumberVotes in the current voting period. This is the number the rankings use.
allTimeVotesnumberLifetime total, never reset.
ranknumberPosition in the overall directory ranking, 1 being top.
voteWindowDaysnumberHow many days a voting period runs before votes reset — 3 normally, 9 on Elite.
votesPeriodStartstringWhen the current voting period began (UTC).
badgestringURL of the embeddable vote badge for this clan.
fetchedAtstringWhen this response was generated (ISO 8601).

Errors

An unknown slug returns 404 with { "error": "Clan not found." }.

Caching and limits

Responses are cached for about 15 seconds. Polling faster than that won't give you fresher numbers — if you're building an overlay, once every 30–60 seconds is plenty.

There's a per-IP limit of 120 requests a minute on this endpoint (60 on the badge). Going over returns 429 with a Retry-After header — wait that many seconds and carry on.

The API is read-only. Only GET (and HEAD/OPTIONS) are accepted; every other method returns 405. There is no public endpoint that accepts data, so nothing you send can change anything on the site.

Vote badge

A self-updating image showing the clan's rank and vote count. Drop it on your site or forum signature — it always shows current numbers, and links back to your listing when you wrap it in a link.

GET https://battlefieldclans.net/api/clans/{slug}/badge            → SVG (default)
GET https://battlefieldclans.net/api/clans/{slug}/badge?format=png → PNG, 560×144

Use the SVG on the web — it's sharp at any size. Use the PNG where SVG isn't rendered, most notably Discord.

Embedding

<!-- HTML -->
<a href="https://battlefieldclans.net/clans/{slug}">
  <img src="https://battlefieldclans.net/api/clans/{slug}/badge" alt="Our clan on Battlefield Clans" width="280" height="72">
</a>

<!-- Markdown -->
[![Our clan](https://battlefieldclans.net/api/clans/{slug}/badge)](https://battlefieldclans.net/clans/{slug})

<!-- BBCode -->
[url=https://battlefieldclans.net/clans/{slug}][img]https://battlefieldclans.net/api/clans/{slug}/badge[/img][/url]

Your clan page has these snippets ready to copy with your slug already filled in.

Examples

curl

curl https://battlefieldclans.net/api/clans/7th-cavalry-gaming/votes

JavaScript (browser or Node)

const res = await fetch(
  "https://battlefieldclans.net/api/clans/7th-cavalry-gaming/votes"
);
const clan = await res.json();
console.log(`${clan.name}: ${clan.votes} votes, rank #${clan.rank}`);

Stream overlay

A self-contained widget you can point OBS's Browser Source at. Save it as an HTML file locally.

<div id="votes">—</div>
<script>
  const SLUG = "your-clan-slug";
  async function tick() {
    try {
      const r = await fetch(
        `https://battlefieldclans.net/api/clans/${SLUG}/votes`
      );
      const c = await r.json();
      document.getElementById("votes").textContent =
        `${c.votes} votes · #${c.rank}`;
    } catch {}
  }
  tick();
  setInterval(tick, 60000);
</script>

Python

import requests

clan = requests.get(
    "https://battlefieldclans.net/api/clans/7th-cavalry-gaming/votes"
).json()
print(clan["votes"], clan["rank"])

Discord bot

If you just want vote counts in your Discord server, you don't need the API — our bot does it for you.

/votesanyoneLook up any clan's live vote count on demand.
/votes-watchstaffPost a clan's votes on a schedule: hourly, daily, weekly or monthly.
/votes-unwatchstaffStop reports for a clan in this channel.
/votes-liststaffShow what's set up in this channel.

/votes-watch takes a style — a new message each time, or one widget message that keeps updating itself — and a look: a rich embed, a single line of plain text, or the same badge card shown above.

Invite the bot

Fair use

  • ·No key, no signup, no hard rate limit — but responses are cached, so polling faster than every 15 seconds gains you nothing.
  • ·The data is public information about public listings. Please don't use it to build a mirror of the directory.
  • ·Endpoints may gain fields over time. They won't have fields removed or renamed without notice, so parse defensively and ignore what you don't recognise.
  • ·Building something that needs more than this? Get in touch and tell us what you need.