Skip to content

Mini-Project 4: Auto-Generate a Sponsor Impact Report from The Blue Alliance API

learnfrc.com
learnfrc.comAuthor
Veer Bajaj
Veer BajajMaintainer

Stewardship is what turns one-time sponsors into multi-year partners, and nothing impresses a sponsor like a polished report that shows exactly what their dollars produced. Instead of assembling it by hand each year, pull the data programmatically from The Blue Alliance (TBA).

Step 1 — Get a Read API key. Log in at thebluealliance.com, open your Account Dashboard, and generate a key under the Read API Keys section. Every request to the base URL https://www.thebluealliance.com/api/v3 must include the header X-TBA-Auth-Key.

Step 2 — Hit the right endpoints. For team key frc254, useful endpoints are:

  • /team/frc254/events/2026/simple — events attended this season
  • /team/frc254/awards/2026 — awards won this season
  • /team/frc254/events/2026/statuses — ranking and playoff status per event

Step 3 — A working script.

import requests
TBA_KEY = "YOUR_READ_API_KEY"
TEAM = "frc254"
YEAR = 2026
BASE = "https://www.thebluealliance.com/api/v3"
HEADERS = {"X-TBA-Auth-Key": TBA_KEY}
def get(path):
r = requests.get(BASE + path, headers=HEADERS, timeout=15)
r.raise_for_status()
return r.json()
events = get(f"/team/{TEAM}/events/{YEAR}/simple")
awards = get(f"/team/{TEAM}/awards/{YEAR}")
print(f"=== {YEAR} Season Impact Report ===")
print(f"Events attended: {len(events)}")
for e in sorted(events, key=lambda x: x["start_date"]):
print(f" - {e['name']} ({e['city']}, {e['state_prov']})")
print(f"\nAwards won: {len(awards)}")
for a in awards:
print(f" - {a['name']} @ event {a['event_key']}")

Run it and you instantly have a verified, citable list of events and awards — no manual data entry, no transcription errors.

Step 4 — Turn data into sponsor language. Sponsors do not care about OPR; they care about reach and outcomes. Combine the TBA data with numbers you track manually (students on the team, outreach hours, people reached at demos) into a one-page report:

Thanks to [Sponsor], in 2026 our 34 students competed at 2 events,
won the [Award], and reached 1,200+ community members through 9 outreach events.

Step 5 — Automate the render. Drop the script output into a template (a Google Doc via the Docs API, or a simple HTML-to-PDF). Even just printing to a formatted text block you paste into a designed one-pager saves hours and guarantees the numbers are accurate.

Respect TBA’s terms: cache responses, do not hammer the API, and attribute data to The Blue Alliance. This same data pipeline feeds your Impact Award documentation and your end-of-year board report, so build it once and reuse it everywhere.

  • The Blue Alliance Read API (base URL https://www.thebluealliance.com/api/v3, header X-TBA-Auth-Key) exposes your events and awards as JSON for free; generate the key under Read API Keys on your Account Dashboard.
  • Key endpoints: /team/{key}/events/{year}, /team/{key}/awards/{year}, /team/{key}/events/{year}/statuses.
  • Translate raw results into sponsor language — reach and outcomes, not OPR — and pair API data with manually tracked outreach numbers.
  • Build the data pipeline once and reuse it for sponsor reports, Impact Award documentation, and board updates.

This lesson was adapted from learnfrc.com.