Skip to content

.fec File Format

Nick Crews edited this page Jun 9, 2023 · 8 revisions

.fec files are used to transmit forms to the US Federal Elections Commission (FEC). Most commonly they are financial reports such as the itemized sources of income and expenditures for committees, but they could also be registration forms, or something else.

There are many versions of the .fec format, going back to before the year 2000. The FEC provides technical documentation on the format. This document serves to augment that, summarizing it and describing the differences between the various formats, so that you can understand how to make a parser that can read a range of versions.

An .fec file consists of 3 sections: A Header, A Cover Record, and 0 or more Itemization Records

Header

The header is the first section. It contains metadata on the .fec file itself:

  • The .fec format version, such as "8.4". This is essential for the rest of the parsing, because it determines the schemas used later on.
  • The name of the software that created the .fec file, and possibly the version.
  • If this .fec file is an amendment to a previous filing, the filing number of the original and which number amendement this is (1, 2, 3 etc)

The structure can be in one of two formats, I'll call them "legacy" and "nonlegacy".

Legacy Headers

/* Header
FEC_Ver_# = 2.02
Soft_Name = FECfile
Soft_Ver# = 3
Dec/NoDec = DEC
Date_Fmat = CCYYMMDD
NameDelim = ^
Form_Name = F3XA
FEC_IDnum = C00101766
Committee = CONTINENTAL AIRLINES INC EMPLOYEE FUND FOR A BETTER AMERICA (FKA CONTINENTAL HOLDINGS PAC)
Control_# = K245592Q
Schedule_Counts:
SA11A1    = 00139
SA17      = 00001
SB23      = 00008
SB29      = 00003
/* End Header

As you can see, legacy headers contain some additional information such as the name of the form and the committee that filed the filing. In non-legacy versions, this extra info was moved out of the header and into the next section, the Cover record

Non-legacy Headers

These look like a row of a CSV file. Versions older than 6.1 use commas (,) as the delimiter. Versions 6.1 and later use the ASCII "field separator" value, a byte with the hex value 0x1C, which is 28 in decimal. We call this character ascii28 to be clear.

The header might look like the following (with ascii28 replaced with 😊 so you can see them, because ascii28 does not render as anything in many programs.)

HDR😊FEC😊8.3😊NGP😊8😊😊😊

In older versions, the 2nd value of "FEC" isn't present:

HDR,8.1,NGP,8,,,

Note that unlike in the legacy header, here the format isn't self-describing: each value is not labeled with what field it represents. And this changes depending on the .fec format version. So, we have to look up the schema separately using the version number. Currently, in feco3 we have a .json file that holds this schema information.

Cover Record

After the header comes a Cover Record. This contains summary information on the filing. This is a single line, in the same CSV-like format as the non-legacy header. Again, the schema varies depending on the version, so we have to look up the schema separately using the version.

Example:

F3A😊C00792689😊Brice Wiggins for Congress😊😊PO Box 1611😊😊Ocean Springs😊MS😊39566😊MS😊04😊YE😊😊😊😊20211001😊20211231😊Feidt😊William😊😊😊😊20220307😊126691.07😊0.00😊126691.07😊3510.80😊0.00😊3510.80😊123180.27😊0.00😊0.00😊114649.00😊4702.00😊119351.00😊0.00😊7240.07😊100.00😊126691.07😊0.00😊0.00😊0.00😊0.00😊0.00😊0.00😊126691.07😊3510.80😊0.00😊0.00😊0.00😊0.00😊0.00😊0.00😊0.00😊0.00😊0.00😊3510.80😊0.00😊126691.07😊126691.07😊3510.80😊123180.27😊126691.07😊0.00😊126691.07😊3510.80😊0.00😊3510.80😊114649.00😊4702.00😊119351.00😊0.00😊7240.07😊100.00😊126691.07😊0.00😊0.00😊0.00😊0.00😊0.00😊0.00😊126691.07😊3510.80😊0.00😊0.00😊0.00😊0.00😊0.00😊0.00😊0.00😊0.00😊0.00😊3510.80

Interpretation:

  • The form code (F3A)
  • The filing committee (C00792689 and Brice Wiggins for Congress)
  • The address of that committee
  • The date of the filing
  • (in some versions) the name of the person filing
  • (in some versions) summary info on the following itemization records, such as number of itemizations, sum of the receipt amounts, etc

Itemization Records

There are 0 or more itemization records. Each record is a single CSV-like row as described in the Non-Legacy Header.

Example:

SA11AI😊C00792689😊SA11AI.4286😊😊😊IND😊😊Alfonso😊Carlene😊😊😊😊5352 Red Creek Road😊😊Long Beach😊MS😊39560😊P2022😊😊20211229😊2900.00😊2900.00😊😊Coldwell Banker Alfonso Realty😊Owner😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊

The first value in each record is the record type, such as "SA11AI". This is composed of two parts:

  1. "SA" refers to one of the Schedules. One of "SA", "SB", "SC", or "SD".
  2. "11AI" the line number within that schedule.

The rest of the values in the record represent different things. Again, we have to look up the schema based on the .fec file version and the record type. In this example, this contains:

  • The receiving committee id ("C00792689")
  • The type of contributor ("IND", meaning individual)
  • The name of the contributor ("Alfonso Carlene")
  • Their address ("5352 Red Creek Road,Long Beach,MS,39560")
  • Their occupation and employer ("Owner, Coldwell Banker Alfonso Realty")
  • The contribution amount and date ($2900, 2021-12-29)
  • Some other stufff
Clone this wiki locally