Public records provider · 4 capabilities

Pennsylvania Mail Ballot Counts (data.pa.gov) API for AI agents and assistants

Pennsylvania mail-in and absentee ballot counts (early votes) from the Pennsylvania Department of State's mail ballot request files on the state open data portal data.pa.gov, extracted daily from the Statewide Uniform Registry of Electors (SURE). Applications, approved and declined applications, ballots sent, ballots returned, votes recorded, cancelled and outstanding ballots, statewide, by party, by method and application type, by county, by congressional, state senate and state house district, and returns per day. Covers the 2026 general election (November 3, 2026; dataset nbwd-pfn4, updated daily) and, for comparison, the final 2024 (3q5t-ddp8) and 2022 (uhfm-zhus) general election files. Every count is aggregated by the portal (SoQL count/sum with group by); the program never returns voter-level rows, birth dates or coordinates. Public Domain U.S. Government; each response carries the dataset, its load time (as_of) and licence. Available to your AI agents via Firecrawl Alexandria.

Try Pennsylvania Mail Ballot Counts (data.pa.gov) with
Firecrawl Alexandria

Choose an example or ask your own question.

Pennsylvania Mail Ballot Counts (data.pa.gov)
TRY ASKING

Capabilities

Pennsylvania Mail Ballot Counts (data.pa.gov) API capabilities via Firecrawl Alexandria

4 capabilities your agent can call with one Firecrawl API key. Open one to try it below.

Playground

Try the Pennsylvania Mail Ballot Counts (data.pa.gov) API via Firecrawl Alexandria

Pick a capability, fill in its inputs and run it, or copy the JavaScript, Python, cURL or CLI code.

1Request
string

Which general election's mail ballot file to read: 2026-general (nbwd-pfn4, updated daily through the canvass), 2024-general (3q5t-ddp8, final) or 2022-general (uhfm-zhus, final; no ballot status or disposition, so approved, declined, votes_recorded and cancelled are null).

5 credits
Codefollows the fields above
const result = await firecrawl.scrape({
  alexandria: {
    provider: "data-pa-gov",
    capability: "elections/mail_ballot_summary",
    options: {},
  },
});
2Response example

This is a sample shape. Press Run to see live data from Pennsylvania Mail Ballot Counts (data.pa.gov).

{
  "by_application_type": [
    {
      "applications": 693715,
      "approved": 689026,
      "ballots_returned": 573700,
      "ballots_sent": 684100,
      "cancelled": 16830,
      "code": "MAILIN",
      "declined": 4689,
      "label": "Mail-in submitted via paper",
      "method": "mail_in",
      "outstanding": 99308,
      "votes_recorded": 569833
    },
    {
      "applications": 396268,
      "approved": 391602,
      "ballots_returned": 310410,
      "ballots_sent": 389281,
      "cancelled": 11068,
      "code": "OLMAILNV",
      "declined": 4666,
      "label": "Mail-in submitted online, ID not verified at submission",
      "method": "mail_in",
      "outstanding": 70237,
      "votes_recorded": 309530
    },
    {
      "applications": 268202,
      "approved": 221529,
      "ballots_returned": 112007,
      "ballots_sent": 221029,
      "cancelled": 3535,
      "code": "OLMAILV",
      "declined": 46673,
      "label": "Mail-in submitted online, ID verified at submission",
      "method": "mail_in",
      "outstanding": 105847,
      "votes_recorded": 111495
    },
    {
      "applications": 7232,
      "approved": 7210,
      "ballots_returned": 2978,
      "ballots_sent": 7192,
      "cancelled": 347,
      "code": "F",
      "declined": 22,
      "label": "Federal voter (federal races only)",
      "method": "military_overseas",
      "outstanding": 3893,
      "votes_recorded": 2957
    },
    {
      "applications": 7107,
      "approved": 7101,
      "ballots_returned": 2939,
      "ballots_sent": 7081,
      "cancelled": 278,
      "code": "CVO",
      "declined": 6,
      "label": "Overseas voter",
      "method": "military_overseas",
      "outstanding": 3884,
      "votes_recorded": 2931
    },
    {
      "applications": 6384,
      "approved": 6320,
      "ballots_returned": 4675,
      "ballots_sent": 6247,
      "cancelled": 260,
      "code": "REG",
      "declined": 64,
      "label": "Absentee submitted via paper",
      "method": "absentee",
      "outstanding": 1378,
      "votes_recorded": 4648
    },
    {
      "applications": 4913,
      "approved": 4263,
      "ballots_returned": 2785,
      "ballots_sent": 4257,
      "cancelled": 81,
      "code": "OLREGV",
      "declined": 650,
      "label": "Absentee submitted online, ID verified at submission",
      "method": "absentee",
      "outstanding": 1396,
      "votes_recorded": 2779
    },
    {
      "applications": 2225,
      "approved": 2223,
      "ballots_returned": 841,
      "ballots_sent": 2210,
      "cancelled": 67,
      "code": "M",
      "declined": 2,
      "label": "Military",
      "method": "military_overseas",
      "outstanding": 1311,
      "votes_recorded": 838
    },
    {
      "applications": 628,
      "approved": 627,
      "ballots_returned": 358,
      "ballots_sent": 619,
      "cancelled": 1,
      "code": "C",
      "declined": 1,
      "label": "Emergency absentee",
      "method": "absentee",
      "outstanding": 265,
      "votes_recorded": 357
    },
    {
      "applications": 287,
      "approved": 287,
      "ballots_returned": 217,
      "ballots_sent": 285,
      "cancelled": 10,
      "code": "CIV",
      "declined": 0,
      "label": "Civilian absentee submitted via paper",
      "method": "absentee",
      "outstanding": 60,
      "votes_recorded": 217
    },
    {
      "applications": 282,
      "approved": 233,
      "ballots_returned": 127,
      "ballots_sent": 226,
      "cancelled": 13,
      "code": "OLREGNV",
      "declined": 49,
      "label": "Absentee submitted online, ID not verified at submission",
      "method": "absentee",
      "outstanding": 91,
      "votes_recorded": 124
    },
    {
      "applications": 12,
      "approved": 12,
      "ballots_returned": 6,
      "ballots_sent": 11,
      "cancelled": 0,
      "code": "CRI",
      "declined": 0,
      "label": "Overseas voter, remote or isolated",
      "method": "military_overseas",
      "outstanding": 5,
      "votes_recorded": 6
    },
    {
      "applications": 9,
      "approved": 5,
      "ballots_returned": 0,
      "ballots_sent": 0,
      "cancelled": 0,
      "code": null,
      "declined": 4,
      "label": null,
      "method": "other",
      "outstanding": 0,
      "votes_recorded": 0
    },
    {
      "applications": 6,
      "approved": 6,
      "ballots_returned": 5,
      "ballots_sent": 6,
      "cancelled": 0,
      "code": "MRI",
      "declined": 0,
      "label": "Military, remote or isolated",
      "method": "military_overseas",
      "outstanding": 1,
      "votes_recorded": 5
    },
    {
      "applications": 2,
      "approved": 2,
      "ballots_returned": 2,
      "ballots_sent": 2,
      "cancelled": 0,
      "code": "ALT",
      "declined": 0,
      "label": "Alternative ballot (disabled or 65 and older, polling place not accessible)",
      "method": "alternative",
      "outstanding": 0,
      "votes_recorded": 2
    },
    {
      "applications": 1,
      "approved": 1,
      "ballots_returned": 1,
      "ballots_sent": 1,
      "cancelled": 0,
      "code": "PMI",
      "declined": 0,
      "label": "Mail-in, permanent status requested",
      "method": "mail_in",
      "outstanding": 0,
      "votes_recorded": 1
    },
    {
      "applications": 1,
      "approved": 1,
      "ballots_returned": 1,
      "ballots_sent": 1,
      "cancelled": 0,
      "code": "V",
      "declined": 0,
      "label": "Veteran",
      "method": "military_overseas",
      "outstanding": 0,
      "votes_recorded": 1
    }
  ],
  "by_method": [
    {
      "applications": 1358186,
      "approved": 1302158,
      "ballots_returned": 996118,
      "ballots_sent": 1294411,
      "cancelled": 31433,
      "declined": 56028,
      "method": "mail_in",
      "outstanding": 275392,
      "votes_recorded": 990859
    },
    {
      "applications": 12494,
      "approved": 11730,
      "ballots_returned": 8162,
      "ballots_sent": 11634,
      "cancelled": 365,
      "declined": 764,
      "method": "absentee",
      "outstanding": 3190,
      "votes_recorded": 8125
    },
    {
      "applications": 16583,
      "approved": 16553,
      "ballots_returned": 6770,
      "ballots_sent": 16501,
      "cancelled": 692,
      "declined": 30,
      "method": "military_overseas",
      "outstanding": 9094,
      "votes_recorded": 6738
    },
    {
      "applications": 2,
      "approved": 2,
      "ballots_returned": 2,
      "ballots_sent": 2,
      "cancelled": 0,
      "declined": 0,
      "method": "alternative",
      "outstanding": 0,
      "votes_recorded": 2
    },
    {
      "applications": 9,
      "approved": 5,
      "ballots_returned": 0,
      "ballots_sent": 0,
      "cancelled": 0,
      "declined": 4,
      "method": "other",
      "outstanding": 0,
      "votes_recorded": 0
    }
  ],
  "by_party": [
    {
      "applications": 890694,
      "approved": 852207,
      "ballots_returned": 655612,
      "ballots_sent": 847147,
      "cancelled": 21047,
      "declined": 38487,
      "outstanding": 175879,
      "party": "DEM",
      "votes_recorded": 652509
    },
    {
      "applications": 338904,
      "approved": 328953,
      "ballots_returned": 255621,
      "ballots_sent": 326778,
      "cancelled": 8309,
      "declined": 9951,
      "outstanding": 65430,
      "party": "REP",
      "votes_recorded": 253937
    },
    {
      "applications": 152551,
      "approved": 144508,
      "ballots_returned": 97006,
      "ballots_sent": 143861,
      "cancelled": 3023,
      "declined": 8043,
      "outstanding": 44503,
      "party": "OTH",
      "votes_recorded": 96491
    },
    {
      "applications": 3512,
      "approved": 3297,
      "ballots_returned": 1948,
      "ballots_sent": 3289,
      "cancelled": 79,
      "declined": 215,
      "outstanding": 1277,
      "party": "LIB",
      "votes_recorded": 1930
    },
    {
      "applications": 1613,
      "approved": 1483,
      "ballots_returned": 865,
      "ballots_sent": 1473,
      "cancelled": 32,
      "declined": 130,
      "outstanding": 587,
      "party": "GRN",
      "votes_recorded": 857
    }
  ],
  "dataset": {
    "as_of": "2026-10-30T13:09:57Z",
    "id": "nbwd-pfn4",
    "name": "2026 General Election Mail Ballot Requests Department of State",
    "portal": "data.pa.gov",
    "url": "https://data.pa.gov/d/nbwd-pfn4"
  },
  "election": {
    "election_day": "2026-11-03",
    "id": "2026-general",
    "name": "2026 General Election"
  },
  "license": {
    "attribution": "Pennsylvania Department of State, 2026 General Election Mail Ballot Requests Department of State (https://data.pa.gov/d/nbwd-pfn4)",
    "name": "Public Domain U.S. Government",
    "url": "https://www.usa.gov/government-works"
  },
  "observed_at_ms": 1793378936930,
  "source_urls": [
    "https://data.pa.gov/resource/nbwd-pfn4.json?%24select=case%28party+in%28%27D%27%2C%27DEM%27%29%2C%27DEM%27%2Cparty+in%28%27R%27%2C%27REP%27%29%2C%27REP%27%2Cparty+in%28%27LN%27%2C%27LIB%27%29%2C%27LIB%27%2Cparty+in%28%27GR%27%2C%27GRN%27%29%2C%27GRN%27%2Ctrue%2C%27OTH%27%29+as+party_group%2Ccount%28*%29+as+applications%2Csum%28case%28ballot_application_disposition%3D%27Approved%27%2C1%2Ctrue%2C0%29%29+as+approved%2Csum%28case%28ballot_application_disposition%3D%27Declined%27%2C1%2Ctrue%2C0%29%29+as+declined%2Ccount%28ballotsentdate%29+as+ballots_sent%2Ccount%28ballotreturneddate%29+as+ballots_returned%2Csum%28case%28ballot_status%3D%27Vote+Recorded%27%2C1%2Ctrue%2C0%29%29+as+votes_recorded%2Csum%28case%28ballot_status%3D%27Cancelled%27%2C1%2Ctrue%2C0%29%29+as+cancelled%2Csum%28case%28ballotsentdate+IS+NOT+NULL+AND+ballotreturneddate+IS+NULL+AND+%28ballot_status+IS+NULL+OR+ballot_status+%21%3D+%27Cancelled%27%29%2C1%2Ctrue%2C0%29%29+as+outstanding&%24group=party_group&%24order=party_group&%24limit=5000",
    "https://data.pa.gov/resource/nbwd-pfn4.json?%24select=mailapplicationtype+as+application_type%2Ccount%28*%29+as+applications%2Csum%28case%28ballot_application_disposition%3D%27Approved%27%2C1%2Ctrue%2C0%29%29+as+approved%2Csum%28case%28ballot_application_disposition%3D%27Declined%27%2C1%2Ctrue%2C0%29%29+as+declined%2Ccount%28ballotsentdate%29+as+ballots_sent%2Ccount%28ballotreturneddate%29+as+ballots_returned%2Csum%28case%28ballot_status%3D%27Vote+Recorded%27%2C1%2Ctrue%2C0%29%29+as+votes_recorded%2Csum%28case%28ballot_status%3D%27Cancelled%27%2C1%2Ctrue%2C0%29%29+as+cancelled%2Csum%28case%28ballotsentdate+IS+NOT+NULL+AND+ballotreturneddate+IS+NULL+AND+%28ballot_status+IS+NULL+OR+ballot_status+%21%3D+%27Cancelled%27%29%2C1%2Ctrue%2C0%29%29+as+outstanding&%24group=application_type&%24order=application_type&%24limit=5000"
  ],
  "totals": {
    "applications": 1387274,
    "approved": 1330448,
    "ballots_returned": 1011052,
    "ballots_sent": 1322548,
    "cancelled": 32490,
    "declined": 56826,
    "outstanding": 287676,
    "votes_recorded": 1005724
  }
}

Connect

Use the Pennsylvania Mail Ballot Counts (data.pa.gov) API in your agent via Firecrawl Alexandria

Connect Firecrawl once and your agent can call Pennsylvania Mail Ballot Counts (data.pa.gov) and every other provider in Alexandria.

  1. Setup guide for

    01

    Connect your agent to Firecrawl Alexandria

    Add Firecrawl to Claude, ChatGPT, Cursor or your own agent, signed in on a team with Alexandria enabled. One API key from that team reaches Pennsylvania Mail Ballot Counts (data.pa.gov) and every other provider in Alexandria.

  2. 02

    Ask in plain language

    Tell your agent what you need from Pennsylvania Mail Ballot Counts (data.pa.gov). Alexandria finds the capability that fits, and your agent runs it.

    • Mail ballot summary5 credits
    • Mail ballots by county5 credits
    • Mail ballots by district5 credits
    One Firecrawl billFirecrawl credits

    03

    Pay per use

    Each Pennsylvania Mail Ballot Counts (data.pa.gov) call costs Firecrawl credits, all on one Firecrawl bill, so you pay only for what your agent uses.

Why Alexandria

Why use Firecrawl Alexandria

What you get when your agent calls Pennsylvania Mail Ballot Counts (data.pa.gov) through Alexandria instead of a one-off integration.

  • API KEYfc-••••3f2aPennsylvania Ma…Web searchScrapeData providers
    01

    One key for every provider

    • No separate Pennsylvania Mail Ballot Counts (data.pa.gov) account, contract or API key. Calls are billed in Firecrawl credits.
    • The same key reaches Alexandria's data providers plus Firecrawl's web search and scraping.
  • CAPABILITYelections/mail_ballot_sum…INelectionstringOUTresponsejson
    02

    Built for agents

    • Every capability has documented inputs and outputs your agent can read before it calls.
    • Searching Alexandria for the capability that fits is free, through MCP, the CLI or the API.
  • NOT ENOUGH CALLS TO BENCHMARK YETQualitySpeedCost
    03

    Measured in public

    • Quality, speed and cost benchmarks come from real agent calls across every Alexandria user.
    • Category benchmarks compare providers side by side, so you can see which one works best.
  • SOC 2 TYPE IIOPT-IN ZERO DATA RETENTION
    04

    Secure by default

    • Firecrawl is SOC 2 Type II compliant, and the annual renewal audit is in progress.
    • Zero data retention on Firecrawl's side is available on supported Pennsylvania Mail Ballot Counts (data.pa.gov) capabilities when a request opts in; Pennsylvania Mail Ballot Counts (data.pa.gov)'s own retention policy still applies. ZDR searches leave out Alexandria provider results, so call the capability directly.

Benchmarks

Pennsylvania Mail Ballot Counts (data.pa.gov) API benchmarks via Firecrawl Alexandria

Quality, speed and cost, last 24 hours, across every agent call to Pennsylvania Mail Ballot Counts (data.pa.gov) through Alexandria.

Fewer than 20 calls in the last 24 hours, so there is not enough to report yet.

FAQ

Pennsylvania Mail Ballot Counts (data.pa.gov) API via Firecrawl Alexandria FAQs

What is Firecrawl Alexandria?
Firecrawl Alexandria is Firecrawl's library of data providers for AI agents, Pennsylvania Mail Ballot Counts (data.pa.gov) among them. Each provider returns structured data through documented capabilities, and your agent reaches all of them, along with Firecrawl's web search and scraping, from Claude, ChatGPT, Cursor, the MCP server, the CLI or the API. Alexandria needs a Firecrawl account on a team with Alexandria enabled, or an API key from one; keyless connections don't include it.
How do I use the Pennsylvania Mail Ballot Counts (data.pa.gov) API with Firecrawl Alexandria?
Connect Firecrawl to Claude, ChatGPT, Cursor or another AI tool, signed in on a team with Alexandria enabled, and ask for what you need: your agent searches Alexandria, finds Pennsylvania Mail Ballot Counts (data.pa.gov) and calls it. From your own code, search Alexandria for the Pennsylvania Mail Ballot Counts (data.pa.gov) capability you need with the Firecrawl API, SDKs or CLI, then call it with your API key. Either way you don't write any Pennsylvania Mail Ballot Counts (data.pa.gov) integration code.
Do I need a Pennsylvania Mail Ballot Counts (data.pa.gov) account or API key?
No. Calls to Pennsylvania Mail Ballot Counts (data.pa.gov) run through Alexandria and are billed in Firecrawl credits, so you don't need a separate Pennsylvania Mail Ballot Counts (data.pa.gov) account, contract or API key.
How much does the Pennsylvania Mail Ballot Counts (data.pa.gov) API cost through Alexandria?
Each call costs 5 Firecrawl credits. The capabilities list on this page shows the price of each one, and finding the right capability is free.
Can I combine Pennsylvania Mail Ballot Counts (data.pa.gov) with other data providers?
Yes. Your agent can call Pennsylvania Mail Ballot Counts (data.pa.gov) alongside the live web and any other provider in Alexandria, with the same Firecrawl account.
Does Pennsylvania Mail Ballot Counts (data.pa.gov) support zero data retention?
Yes. Every Pennsylvania Mail Ballot Counts (data.pa.gov) capability can run under zero data retention on Firecrawl's side when a request opts in. That covers Firecrawl's retention only: Pennsylvania Mail Ballot Counts (data.pa.gov)'s own retention policy still applies, and requests that don't opt in are retained as usual. ZDR searches leave out Alexandria provider results, so call the capability directly.

Related

Other Public records providers, on the same Firecrawl API key.

//
Get started
//
Give your agent Pennsylvania Mail Ballot Counts (data.pa.gov).
One API key for the live web and every provider in Alexandria.
Are you an AI agent? See setup options