root@breached:~$ curl https://breached.co.za/api/v1/breaches

breached.co.za api

Free, read-only, no key needed.

overview

The API serves the published entries from the tracker as JSON. Pending items, rejected items and anonymous tips are never exposed. Responses are cached for about a minute, support CORS for browser use, and every entry links to its original source.

Base URL: https://breached.co.za/api/v1

endpoints

method and pathwhat it returns
GET /breachesList of published entries with filters and paging (below).
GET /breaches/{id}One published entry, or 404.
GET /statsCounts per year, per month (last 24) and per sector.
GET /feed.xmlAtom feed of the 50 most recently published entries.
GET /openapi.jsonOpenAPI 3 description.

query parameters for /breaches

parametermeaning
published_since (alias added_since)Only entries published after this ISO timestamp, e.g. 2026-12-01T00:00:00Z. Use this to poll for new entries.
updated_sinceOnly entries created or edited after this timestamp (catches corrections).
sinceOnly entries whose date_reported is on or after this date (YYYY-MM-DD).
company, sourceCase-insensitive substring match.
sector, country, yearExact match (country is ISO-2, for example ZA).
sortreported (default, by date reported) or published (by published_at), newest first.
limit, offsetPaging. limit 1 to 200 (default 50). meta.next_offset is null on the last page.

curl examples

# newest reported entries
curl 'https://breached.co.za/api/v1/breaches?limit=5'

# entries published since a timestamp, in publish order
curl 'https://breached.co.za/api/v1/breaches?published_since=2026-12-01T00:00:00Z&sort=published'

# filter
curl 'https://breached.co.za/api/v1/breaches?sector=Retail&year=2026'

# one entry, stats, feed
curl 'https://breached.co.za/api/v1/breaches/2026-travelstart'
curl 'https://breached.co.za/api/v1/stats'
curl 'https://breached.co.za/api/v1/feed.xml'

response schema

{
  "meta": { "total": 41, "count": 1, "limit": 1, "offset": 0, "next_offset": 1, "generated_at": "2026-12-02T19:00:00.000Z" },
  "data": [{
    "id": "2026-travelstart",
    "company": "Travelstart",
    "sector": "Travel",
    "date_reported": "2026-11-20",          // when a source reported it
    "summary": "Short neutral summary ...",
    "source_name": "Example Outlet",
    "source_url": "https://example.com/original-report",
    "country": "ZA",
    "published_at": "2026-12-02T18:30:00.000Z",  // when it went live here (stable)
    "updated_at": "2026-12-02T18:30:00.000Z"     // last edit or publish time
  }]
}

published_at and updated_at are stable, so a poller can detect new entries (published_since) and changed entries (updated_since) by remembering the newest timestamp it has seen.

rate limits

A fair-use limit of about 60 requests per minute per client applies on a best-effort basis (it is enforced per edge location and can be looser than stated). Above it you may get 429 with a Retry-After header. The limit is applied without storing your address. Please poll no more than once every few minutes: results are cached for about a minute anyway.

get new breaches in a Microsoft Teams channel

Option 1, no code (Power Automate / Teams Workflows):

  1. In Teams, add a Workflows flow to your channel, using the template "Post to a channel when a webhook request is received", and copy its webhook URL.
  2. In Power Automate create a scheduled flow: Recurrence (every 30 minutes), then HTTP GET https://breached.co.za/api/v1/breaches?published_since=@{addMinutes(utcNow(),-35)}&sort=published.
  3. Add Parse JSON on the body (use the schema above), then Apply to each over data, and post a message or Adaptive Card to the channel for each item (company, summary, source_url).

Option 2, a small script run by cron, Task Scheduler or a CI job. It keeps a last-seen state file so each entry is posted once, and reads the webhook URL from an environment variable:

export TEAMS_WEBHOOK_URL='https://YOUR-TENANT.webhook.office.com/webhookb2/PLACEHOLDER'
python3 teams-notify.py            # posts new entries, remembers what it has sent
python3 teams-notify.py --dry-run  # shows what it would post

The script posts an Adaptive Card (the format Teams Workflows webhooks accept) and can send the older MessageCard format with TEAMS_FORMAT=messagecard. On first run it only records the newest entry; use --backfill 3 to post the latest three. Never hard-code the webhook URL in a file you share.

show the script (teams-notify.py, standard library only)
import argparse, json, os, sys, urllib.parse, urllib.request

API = os.environ.get("BREACHED_API", "https://breached.co.za/api/v1")
STATE = os.environ.get("BREACHED_STATE", os.path.expanduser("~/.breached_teams_state.json"))


def get(url):
    req = urllib.request.Request(url, headers={"User-Agent": "breached-teams-notify/1.0", "Accept": "application/json"})
    with urllib.request.urlopen(req, timeout=30) as r:
        return json.load(r)


def load_state():
    try:
        with open(STATE) as f:
            return json.load(f)
    except (OSError, ValueError):
        return None


def save_state(st):
    tmp = STATE + ".tmp"
    with open(tmp, "w") as f:
        json.dump(st, f)
    os.replace(tmp, STATE)


def card(e, fmt):
    title = "New South African breach published: " + e["company"]
    facts = [("Reported", e["date_reported"]), ("Sector", e.get("sector") or "n/a"), ("Source", e["source_name"])]
    if fmt == "messagecard":
        return {"@type": "MessageCard", "@context": "https://schema.org/extensions", "summary": title, "themeColor": "39FF88", "title": title,
                "text": e["summary"], "sections": [{"facts": [{"name": k, "value": v} for k, v in facts]}],
                "potentialAction": [{"@type": "OpenUri", "name": "Open source", "targets": [{"os": "default", "uri": e["source_url"]}]}]}
    body = [{"type": "TextBlock", "size": "Medium", "weight": "Bolder", "wrap": True, "text": title},
            {"type": "TextBlock", "wrap": True, "text": e["summary"]},
            {"type": "FactSet", "facts": [{"title": k, "value": v} for k, v in facts]},
            {"type": "TextBlock", "size": "Small", "isSubtle": True, "wrap": True, "text": "Unverified third-party reporting. Via breached.co.za"}]
    content = {"$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.4", "body": body,
               "actions": [{"type": "Action.OpenUrl", "title": "Open source", "url": e["source_url"]}]}
    return {"type": "message", "attachments": [{"contentType": "application/vnd.microsoft.card.adaptive", "contentUrl": None, "content": content}]}


def post(hook, payload):
    req = urllib.request.Request(hook, data=json.dumps(payload).encode(), headers={"Content-Type": "application/json"}, method="POST")
    with urllib.request.urlopen(req, timeout=30) as r:
        return r.status


def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("--dry-run", action="store_true")
    ap.add_argument("--backfill", type=int, default=0)
    a = ap.parse_args()
    hook = os.environ.get("TEAMS_WEBHOOK_URL", "")
    if not hook and not a.dry_run:
        sys.exit("Set TEAMS_WEBHOOK_URL (the Teams Workflows webhook URL).")
    fmt = os.environ.get("TEAMS_FORMAT", "adaptive")
    st = load_state()
    if st is None:  # first run: baseline
        data = get(API + "/breaches?sort=published&limit=%d" % max(a.backfill, 1))["data"]
        newest = max((e["published_at"] for e in data), default="1970-01-01T00:00:00Z")
        todo = data[: a.backfill] if a.backfill else []
        st = {"since": newest, "seen": [e["id"] for e in data]}
        print("first run: baseline set at", newest, "- posting", len(todo), "entries")
    else:
        q = urllib.parse.urlencode({"published_since": st["since"], "sort": "published", "limit": 50})
        todo = [e for e in get(API + "/breaches?" + q)["data"] if e["id"] not in st["seen"]]
    for e in reversed(todo):  # oldest first
        if a.dry_run:
            print("[dry-run] would post:", e["company"], "|", e["date_reported"], "|", e["source_url"])
        else:
            post(hook, card(e, fmt))
            print("posted:", e["company"])
        st["seen"] = (st["seen"] + [e["id"]])[-500:]
        st["since"] = max(st["since"], e["published_at"])
    if not a.dry_run:
        save_state(st)


if __name__ == "__main__":
    main()

attribution and terms