3.0.0 • Published 5 years ago

@datafire/fec_gov v3.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@datafire/fec_gov

Client library for OpenFEC

Installation and Usage

npm install --save @datafire/fec_gov
let fec_gov = require('@datafire/fec_gov').create({
  ApiKeyHeaderAuth: "",
  ApiKeyQueryAuth: "",
  apiKey: ""
});

.then(data => {
  console.log(data);
});

Description

This application programming interface (API) allows you to explore the way candidates and committees fund their campaigns.

The Federal Election Commission (FEC) API is a RESTful web service supporting full-text and field-specific searches on FEC data. Bulk downloads are available on the current site. Information is tied to the underlying forms by file ID and image ID. Data is updated nightly.

There are a lot of data, and a good place to start is to use search to find interesting candidates and committees. Then, you can use their IDs to find report or line item details with the other endpoints. If you are interested in individual donors, check out contributor information in the /schedule_a/ endpoints.

Getting started with the openFEC API

If you would like to use the FEC's API programmatically, you can sign up for your own API key using our form. Alternatively, you can still try out our API without an API key by using the web interface and using DEMO_KEY. Note that when you use the openFEC API you are subject to the Terms of Service and Acceptable Use policy.

Signing up for an API key will enable you to place up to 1,000 calls an hour. Each call is limited to 100 results per page. You can email questions, comments or a request to get a key for 7,200 calls an hour (120 calls per minute) to APIinfo@fec.gov. You can also ask questions and discuss the data in a community led group.

The model definitions and schema are available at /swagger. This is useful for making wrappers and exploring the data.

A few restrictions limit the way you can use FEC data. For example, you can’t use contributor lists for commercial purposes or to solicit donations. Learn more here.

Inspect our source code. We welcome issues and pull requests!

Actions

audit_case.get

This endpoint contains Final Audit Reports approved by the Commission since inception. The search can be based on information about the audited committee (Name, FEC ID Number, Type, Election Cycle) or the issues covered in the report.

fec_gov.audit_case.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • cycle array:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • committee_designation string: Type of committee:
    • api_key required string:
    • committee_id array:
    • primary_category_id string:
    • audit_case_id array:
    • sort array: Provide a field to sort by. Use - for descending order.
    • candidate_id array:
    • audit_id array:
    • committee_type array: The one-letter type code of the organization:
    • min_election_cycle integer:
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • sub_category_id string:
    • page integer: For paginating through results, starting at page 1
    • max_election_cycle integer:
    • q array: The name of the committee. If a committee changes its name, the most recent name will be shown. Committee names are not unique. Use committee_id for looking up records.
    • sort_nulls_last boolean: Toggle that sorts null values last
    • qq array: Name of candidate running for office

Output

audit_category.get

This lists the options for the categories and subcategories available in the /audit-search/ endpoint.

fec_gov.audit_category.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • primary_category_name array: Primary Audit Category
    • page integer: For paginating through results, starting at page 1
    • primary_category_id array:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • sort string: Provide a field to sort by. Use - for descending order.

Output

audit_primary_category.get

This lists the options for the primary categories available in the /audit-search/ endpoint.

fec_gov.audit_primary_category.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • primary_category_name array: Primary Audit Category
    • page integer: For paginating through results, starting at page 1
    • primary_category_id array:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • sort string: Provide a field to sort by. Use - for descending order.

Output

calendar_dates.get

Combines the election and reporting dates with Commission meetings, conferences, outreach, Advisory Opinions, rules, litigation dates and other events into one calendar.

State and report type filtering is no longer available.

fec_gov.calendar_dates.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • min_end_date string:
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • max_end_date string:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • page integer: For paginating through results, starting at page 1
    • description array: Brief description of event
    • event_id integer: An unique ID for an event. Useful for downloading a single event to your calendar. This ID is not a permanent, persistent ID.
    • summary array: Longer description of event
    • calendar_category_id array:
    • min_start_date string:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • max_start_date string:
    • sort string: Provide a field to sort by. Use - for descending order.

Output

calendar_dates.export.get

Returns CSV or ICS for downloading directly into calendar applications like Google, Outlook or other applications.

Combines the election and reporting dates with Commission meetings, conferences, outreach, Advisory Opinions, rules, litigation dates and other events into one calendar.

State filtering now applies to elections, reports and reporting periods.

Presidential pre-primary report due dates are not shown on even years. Filers generally opt to file monthly rather than submit over 50 pre-primary election reports. All reporting deadlines are available at /reporting-dates/ for reference.

This is the sql function that creates the calendar.

fec_gov.calendar_dates.export.get({
  "api_key": ""
}, context)

Input

  • input object
    • max_end_date string:
    • min_end_date string:
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • page integer: For paginating through results, starting at page 1
    • description array: Brief description of event
    • event_id integer: An unique ID for an event. Useful for downloading a single event to your calendar. This ID is not a permanent, persistent ID.
    • api_key required string:
    • summary array: Longer description of event
    • calendar_category_id array:
    • min_start_date string:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • renderer string (values: ics, csv)
    • max_start_date string:
    • sort string: Provide a field to sort by. Use - for descending order.

Output

candidate.candidate_id.get

This endpoint is useful for finding detailed information about a particular candidate. Use the candidate_id to find the most recent information about that candidate.

fec_gov.candidate.candidate_id.get({
  "api_key": "",
  "candidate_id": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • cycle array:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • has_raised_funds boolean: A boolean that describes if a candidate's committee has ever received any receipts for their campaign for this particular office. (Candidates have separate candidate IDs for each office.)
    • district array: Two-digit US House distirict of the office the candidate is running for. Presidential, Senate and House at-large candidates will have District 00.
    • party array: Three-letter code for the party affiliated with a candidate or committee. For example, DEM for Democratic Party and REP for Republican Party.
    • candidate_status array: One-letter code explaining if the candidate is:
    • federal_funds_flag boolean: A boolean the describes if a presidential candidate has accepted federal funds. The flag will be false for House and Senate candidates.
    • sort string: Provide a field to sort by. Use - for descending order.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • incumbent_challenge array: One-letter code ('I', 'C', 'O') explaining if the candidate is an incumbent, a challenger, or if the seat is open.
    • election_year array: Year of election
    • office array: Federal office candidate runs for: H, S or P
    • year string: Retrieve records pertaining to a particular election year. The list of election years is based on a candidate filing a statement of candidacy (F2) for that year.
    • page integer: For paginating through results, starting at page 1
    • name array: Name (candidate or committee) to search for. Alias for 'q'.
    • state array: US state or territory where a candidate runs for office
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • candidate_id required string:

Output

candidate.candidate_id.committees.get

This endpoint is useful for finding detailed information about a particular committee or filer. Use the committee_id to find the most recent information about the committee.

fec_gov.candidate.candidate_id.committees.get({
  "api_key": "",
  "candidate_id": ""
}, context)

Input

  • input object
    • committee_type array: The one-letter type code of the organization:
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • cycle array:
    • organization_type array: The one-letter code for the kind for organization:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • year array: A year that the committee was active— (after original registration date or filing but before expiration date)
    • page integer: For paginating through results, starting at page 1
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • designation array: The one-letter designation code of the organization:
    • sort string: Provide a field to sort by. Use - for descending order.
    • filing_frequency array: The one-letter
    • candidate_id required string:

Output

candidate.candidate_id.committees.history.get

Explore a filer's characteristics over time. This can be particularly useful if the committees change treasurers, designation, or committee_type.

fec_gov.candidate.candidate_id.committees.history.get({
  "api_key": "",
  "candidate_id": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • election_full boolean: True indicates that full election period of a candidate.
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • page integer: For paginating through results, starting at page 1
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • designation array: The one-letter designation code of the organization:
    • sort string: Provide a field to sort by. Use - for descending order.
    • candidate_id required string:

Output

candidate.candidate_id.committees.history.cycle.get

Explore a filer's characteristics over time. This can be particularly useful if the committees change treasurers, designation, or committee_type.

fec_gov.candidate.candidate_id.committees.history.cycle.get({
  "api_key": "",
  "candidate_id": "",
  "cycle": 0
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • election_full boolean: True indicates that full election period of a candidate.
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • page integer: For paginating through results, starting at page 1
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • designation array: The one-letter designation code of the organization:
    • sort string: Provide a field to sort by. Use - for descending order.
    • candidate_id required string:
    • cycle required integer:

Output

candidate.candidate_id.filings.get

All official records and reports filed by or delivered to the FEC.

Note: because the filings data includes many records, counts for large result sets are approximate; you will want to page through the records until no records are returned.

fec_gov.candidate.candidate_id.filings.get({
  "api_key": "",
  "candidate_id": ""
}, context)

Input

  • input object
    • document_type array:
    • primary_general_indicator array:
    • per_page integer: The number of results returned per page. Defaults to 20.
    • amendment_indicator array: Amendent types:
    • cycle array:
    • request_type array: Requests for additional information (RFAIs) sent to filers. The request type is based on the type of document filed:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • min_receipt_date string:
    • most_recent boolean:
    • file_number array: Filing ID number
    • api_key required string:
    • district array: Two-digit US House distirict of the office the candidate is running for. Presidential, Senate and House at-large candidates will have District 00.
    • form_type array: The form where the underlying data comes from, for example, Form 1 would appear as F1:
    • party array: Three-letter code for the party affiliated with a candidate or committee. For example, DEM for Democratic Party and REP for Republican Party.
    • sort array: Provide a field to sort by. Use - for descending order.
    • is_amended boolean:
    • committee_type string: The one-letter type code of the organization:
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • form_category array:
    • beginning_image_number array:
    • office array: Federal office candidate runs for: H, S or P
    • page integer: For paginating through results, starting at page 1
    • report_type array: Name of report where the underlying data comes from:
    • filer_type string (values: e-file, paper): The method used to file with the FEC, either electronic or on paper.
    • state array: US state or territory where a candidate runs for office
    • sort_nulls_last boolean: Toggle that sorts null values last
    • max_receipt_date string:
    • report_year array:
    • candidate_id required string:

Output

candidate.candidate_id.history.get

Find out a candidate's characteristics over time. This is particularly useful if the candidate runs for the same office in different districts or you want to know more about a candidate's previous races.

This information is organized by candidate_id, so it won't help you find a candidate who ran for different offices over time; candidates get a new ID for each office.

fec_gov.candidate.candidate_id.history.get({
  "api_key": "",
  "candidate_id": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • sort_nulls_last boolean: Toggle that sorts null values last
    • election_full boolean: True indicates that full election period of a candidate.
    • api_key required string:
    • page integer: For paginating through results, starting at page 1
    • sort string: Provide a field to sort by. Use - for descending order.
    • candidate_id required string:

Output

candidate.candidate_id.history.cycle.get

Find out a candidate's characteristics over time. This is particularly useful if the candidate runs for the same office in different districts or you want to know more about a candidate's previous races.

This information is organized by candidate_id, so it won't help you find a candidate who ran for different offices over time; candidates get a new ID for each office.

fec_gov.candidate.candidate_id.history.cycle.get({
  "api_key": "",
  "candidate_id": "",
  "cycle": 0
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • sort_nulls_last boolean: Toggle that sorts null values last
    • election_full boolean: True indicates that full election period of a candidate.
    • api_key required string:
    • page integer: For paginating through results, starting at page 1
    • sort string: Provide a field to sort by. Use - for descending order.
    • candidate_id required string:
    • cycle required integer:

Output

candidate.candidate_id.totals.get

This endpoint provides information about a committee's Form 3, Form 3X, or Form 3P financial reports, which are aggregated by two-year period. We refer to two-year periods as a cycle.

The cycle is named after the even-numbered year and includes the year before it. To obtain totals from 2013 and 2014, you would use 2014. In odd-numbered years, the current cycle is the next year — for example, in 2015, the current cycle is 2016.

For presidential and Senate candidates, multiple two-year cycles exist between elections.

Parameter full_election is replaced by election_full. Please use election_full instead.

fec_gov.candidate.candidate_id.totals.get({
  "api_key": "",
  "candidate_id": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • cycle array:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • full_election boolean: Parameter full_election is replaced by election_full. Please use election_full instead.
    • page integer: For paginating through results, starting at page 1
    • sort_nulls_last boolean: Toggle that sorts null values last
    • election_full boolean: True indicates that full election period of a candidate.
    • api_key required string:
    • sort string: Provide a field to sort by. Use - for descending order.
    • candidate_id required string:

Output

candidates.get

Fetch basic information about candidates, and use parameters to filter results to the candidates you're looking for.

Each result reflects a unique FEC candidate ID. That ID is particular to the candidate for a particular office sought. If a candidate runs for the same office multiple times, the ID stays the same. If the same person runs for another office — for example, a House candidate runs for a Senate office — that candidate will get a unique ID for each office.

fec_gov.candidates.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • cycle array:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • min_first_file_date string: Selects all candidates whose first filing was received by the FEC after this date.
    • max_first_file_date string: Selects all candidates whose first filing was received by the FEC before this date.
    • has_raised_funds boolean: A boolean that describes if a candidate's committee has ever received any receipts for their campaign for this particular office. (Candidates have separate candidate IDs for each office.)
    • district array: Two-digit US House distirict of the office the candidate is running for. Presidential, Senate and House at-large candidates will have District 00.
    • party array: Three-letter code for the party affiliated with a candidate or committee. For example, DEM for Democratic Party and REP for Republican Party.
    • candidate_status array: One-letter code explaining if the candidate is:
    • federal_funds_flag boolean: A boolean the describes if a presidential candidate has accepted federal funds. The flag will be false for House and Senate candidates.
    • sort string: Provide a field to sort by. Use - for descending order.
    • candidate_id array:
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • incumbent_challenge array: One-letter code ('I', 'C', 'O') explaining if the candidate is an incumbent, a challenger, or if the seat is open.
    • election_year array: Year of election
    • office array: Federal office candidate runs for: H, S or P
    • year string: Retrieve records pertaining to a particular election year. The list of election years is based on a candidate filing a statement of candidacy (F2) for that year.
    • page integer: For paginating through results, starting at page 1
    • name array: Name (candidate or committee) to search for. Alias for 'q'.
    • is_active_candidate boolean: Candidates who are actively seeking office. If no value is specified, all candidates
    • state array: US state or territory where a candidate runs for office
    • q array: Name of candidate running for office
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:

Output

candidates.search.get

Fetch basic information about candidates and their principal committees.

Each result reflects a unique FEC candidate ID. That ID is assigned to the candidate for a particular office sought. If a candidate runs for the same office over time, that ID stays the same. If the same person runs for multiple offices — for example, a House candidate runs for a Senate office — that candidate will get a unique ID for each office.

The candidate endpoints primarily use data from FEC registration Form 1, for candidate information, and Form 2, for committees information, with additional information to provide context.

fec_gov.candidates.search.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • cycle array:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • min_first_file_date string: Selects all candidates whose first filing was received by the FEC after this date.
    • max_first_file_date string: Selects all candidates whose first filing was received by the FEC before this date.
    • has_raised_funds boolean: A boolean that describes if a candidate's committee has ever received any receipts for their campaign for this particular office. (Candidates have separate candidate IDs for each office.)
    • district array: Two-digit US House distirict of the office the candidate is running for. Presidential, Senate and House at-large candidates will have District 00.
    • party array: Three-letter code for the party affiliated with a candidate or committee. For example, DEM for Democratic Party and REP for Republican Party.
    • candidate_status array: One-letter code explaining if the candidate is:
    • federal_funds_flag boolean: A boolean the describes if a presidential candidate has accepted federal funds. The flag will be false for House and Senate candidates.
    • sort string: Provide a field to sort by. Use - for descending order.
    • candidate_id array:
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • incumbent_challenge array: One-letter code ('I', 'C', 'O') explaining if the candidate is an incumbent, a challenger, or if the seat is open.
    • election_year array: Year of election
    • office array: Federal office candidate runs for: H, S or P
    • year string: Retrieve records pertaining to a particular election year. The list of election years is based on a candidate filing a statement of candidacy (F2) for that year.
    • page integer: For paginating through results, starting at page 1
    • name array: Name (candidate or committee) to search for. Alias for 'q'.
    • is_active_candidate boolean: Candidates who are actively seeking office. If no value is specified, all candidates
    • state array: US state or territory where a candidate runs for office
    • q array: Name of candidate running for office
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:

Output

candidates.totals.get

Aggregated candidate receipts and disbursements grouped by cycle.

fec_gov.candidates.totals.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • cycle array:
    • min_receipts string: Minimum aggregated receipts
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • election_full boolean: True indicates that full election period of a candidate.
    • max_receipts string: Maximum aggregated receipts
    • min_disbursements string: Minimum aggregated disbursements
    • has_raised_funds boolean: A boolean that describes if a candidate's committee has ever received any receipts for their campaign for this particular office. (Candidates have separate candidate IDs for each office.)
    • district array: District of candidate
    • party array: Three-letter party code
    • min_debts_owed_by_committee string: Minimum debt
    • federal_funds_flag boolean: A boolean the describes if a presidential candidate has accepted federal funds. The flag will be false for House and Senate candidates.
    • sort string: Provide a field to sort by. Use - for descending order.
    • candidate_id array:
    • max_debts_owed_by_committee string: Maximum debt
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • election_year array:
    • office array: Federal office candidate runs for: H, S or P
    • max_cash_on_hand_end_period string: Maximum cash on hand
    • page integer: For paginating through results, starting at page 1
    • max_disbursements string: Maximum aggregated disbursements
    • is_active_candidate boolean: Candidates who are actively seeking office. If no value is specified, all candidates
    • state array: State of candidate
    • q array: Name of candidate running for office
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • min_cash_on_hand_end_period string: Minimum cash on hand

Output

candidates.totals.by_office.get

Aggregated candidate receipts and disbursements grouped by office by cycle.

fec_gov.candidates.totals.by_office.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • election_year array:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • office string (values: , H, S, P): Federal office candidate runs for: H, S or P
    • page integer: For paginating through results, starting at page 1
    • is_active_candidate boolean: Candidates who are actively seeking office. If no value is specified, all candidates
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • sort string: Provide a field to sort by. Use - for descending order.

Output

candidates.totals.by_office.by_party.get

Aggregated candidate receipts and disbursements grouped by office by party by cycle.

fec_gov.candidates.totals.by_office.by_party.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • election_year array:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • office string (values: , H, S, P): Federal office candidate runs for: H, S or P
    • page integer: For paginating through results, starting at page 1
    • is_active_candidate boolean: Candidates who are actively seeking office. If no value is specified, all candidates
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • sort string: Provide a field to sort by. Use - for descending order.

Output

committee.committee_id.get

This endpoint is useful for finding detailed information about a particular committee or filer. Use the committee_id to find the most recent information about the committee.

fec_gov.committee.committee_id.get({
  "api_key": "",
  "committee_id": ""
}, context)

Input

  • input object
    • committee_type array: The one-letter type code of the organization:
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • cycle array:
    • organization_type array: The one-letter code for the kind for organization:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • year array: A year that the committee was active— (after original registration date or filing but before expiration date)
    • page integer: For paginating through results, starting at page 1
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • designation array: The one-letter designation code of the organization:
    • sort string: Provide a field to sort by. Use - for descending order.
    • filing_frequency array: The one-letter
    • committee_id required string:

Output

committee.committee_id.candidates.get

This endpoint is useful for finding detailed information about a particular candidate. Use the candidate_id to find the most recent information about that candidate.

fec_gov.committee.committee_id.candidates.get({
  "api_key": "",
  "committee_id": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • cycle array:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • has_raised_funds boolean: A boolean that describes if a candidate's committee has ever received any receipts for their campaign for this particular office. (Candidates have separate candidate IDs for each office.)
    • district array: Two-digit US House distirict of the office the candidate is running for. Presidential, Senate and House at-large candidates will have District 00.
    • party array: Three-letter code for the party affiliated with a candidate or committee. For example, DEM for Democratic Party and REP for Republican Party.
    • candidate_status array: One-letter code explaining if the candidate is:
    • federal_funds_flag boolean: A boolean the describes if a presidential candidate has accepted federal funds. The flag will be false for House and Senate candidates.
    • sort string: Provide a field to sort by. Use - for descending order.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • incumbent_challenge array: One-letter code ('I', 'C', 'O') explaining if the candidate is an incumbent, a challenger, or if the seat is open.
    • election_year array: Year of election
    • office array: Federal office candidate runs for: H, S or P
    • year string: Retrieve records pertaining to a particular election year. The list of election years is based on a candidate filing a statement of candidacy (F2) for that year.
    • page integer: For paginating through results, starting at page 1
    • name array: Name (candidate or committee) to search for. Alias for 'q'.
    • state array: US state or territory where a candidate runs for office
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • committee_id required string:

Output

committee.committee_id.candidates.history.get

Find out a candidate's characteristics over time. This is particularly useful if the candidate runs for the same office in different districts or you want to know more about a candidate's previous races.

This information is organized by candidate_id, so it won't help you find a candidate who ran for different offices over time; candidates get a new ID for each office.

fec_gov.committee.committee_id.candidates.history.get({
  "api_key": "",
  "committee_id": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • sort_nulls_last boolean: Toggle that sorts null values last
    • election_full boolean: True indicates that full election period of a candidate.
    • api_key required string:
    • page integer: For paginating through results, starting at page 1
    • sort string: Provide a field to sort by. Use - for descending order.
    • committee_id required string:

Output

committee.committee_id.candidates.history.cycle.get

Find out a candidate's characteristics over time. This is particularly useful if the candidate runs for the same office in different districts or you want to know more about a candidate's previous races.

This information is organized by candidate_id, so it won't help you find a candidate who ran for different offices over time; candidates get a new ID for each office.

fec_gov.committee.committee_id.candidates.history.cycle.get({
  "api_key": "",
  "committee_id": "",
  "cycle": 0
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • sort_nulls_last boolean: Toggle that sorts null values last
    • election_full boolean: True indicates that full election period of a candidate.
    • api_key required string:
    • page integer: For paginating through results, starting at page 1
    • sort string: Provide a field to sort by. Use - for descending order.
    • committee_id required string:
    • cycle required integer:

Output

committee.committee_id.filings.get

All official records and reports filed by or delivered to the FEC.

Note: because the filings data includes many records, counts for large result sets are approximate; you will want to page through the records until no records are returned.

fec_gov.committee.committee_id.filings.get({
  "api_key": "",
  "committee_id": ""
}, context)

Input

  • input object
    • document_type array:
    • primary_general_indicator array:
    • per_page integer: The number of results returned per page. Defaults to 20.
    • amendment_indicator array: Amendent types:
    • cycle array:
    • request_type array: Requests for additional information (RFAIs) sent to filers. The request type is based on the type of document filed:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • min_receipt_date string:
    • most_recent boolean:
    • file_number array: Filing ID number
    • api_key required string:
    • district array: Two-digit US House distirict of the office the candidate is running for. Presidential, Senate and House at-large candidates will have District 00.
    • form_type array: The form where the underlying data comes from, for example, Form 1 would appear as F1:
    • party array: Three-letter code for the party affiliated with a candidate or committee. For example, DEM for Democratic Party and REP for Republican Party.
    • sort array: Provide a field to sort by. Use - for descending order.
    • is_amended boolean:
    • committee_type string: The one-letter type code of the organization:
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • form_category array:
    • beginning_image_number array:
    • office array: Federal office candidate runs for: H, S or P
    • page integer: For paginating through results, starting at page 1
    • report_type array: Name of report where the underlying data comes from:
    • filer_type string (values: e-file, paper): The method used to file with the FEC, either electronic or on paper.
    • state array: US state or territory where a candidate runs for office
    • sort_nulls_last boolean: Toggle that sorts null values last
    • max_receipt_date string:
    • report_year array:
    • committee_id required string:

Output

committee.committee_id.history.get

Explore a filer's characteristics over time. This can be particularly useful if the committees change treasurers, designation, or committee_type.

fec_gov.committee.committee_id.history.get({
  "api_key": "",
  "committee_id": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • election_full boolean: True indicates that full election period of a candidate.
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • page integer: For paginating through results, starting at page 1
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • designation array: The one-letter designation code of the organization:
    • sort string: Provide a field to sort by. Use - for descending order.
    • committee_id required string:

Output

committee.committee_id.history.cycle.get

Explore a filer's characteristics over time. This can be particularly useful if the committees change treasurers, designation, or committee_type.

fec_gov.committee.committee_id.history.cycle.get({
  "api_key": "",
  "committee_id": "",
  "cycle": 0
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • election_full boolean: True indicates that full election period of a candidate.
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • page integer: For paginating through results, starting at page 1
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • designation array: The one-letter designation code of the organization:
    • sort string: Provide a field to sort by. Use - for descending order.
    • committee_id required string:
    • cycle required integer:

Output

committee.committee_id.reports.get

Each report represents the summary information from Form 3, Form 3X and Form 3P. These reports have key statistics that illuminate the financial status of a given committee. Things like cash on hand, debts owed by committee, total receipts, and total disbursements are especially helpful for understanding a committee's financial dealings.

By default, this endpoint includes both amended and final versions of each report. To restrict to only the final versions of each report, use is_amended=false; to retrieve only reports that have been amended, use is_amended=true.

Several different reporting structures exist, depending on the type of organization that submits financial information. To see an example of these reporting requirements, look at the summary and detailed summary pages of Form 3, Form 3X, and Form 3P.

DISCLAIMER: The field labels contained within this resource are subject to change. We are attempting to succinctly label these fields while conveying clear meaning to ensure accessibility for all users.

fec_gov.committee.committee_id.reports.get({
  "api_key": "",
  "committee_id": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • cycle array:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • min_independent_expenditures string:
    • min_debts_owed_amount string:
    • max_party_coordinated_expenditures string:
    • min_disbursements_amount string:
    • min_total_contributions string:
    • min_receipts_amount string:
    • sort array: Provide a field to sort by. Use - for descending order.
    • is_amended boolean:
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • beginning_image_number array:
    • year array:
    • page integer: For paginating through results, starting at page 1
    • max_total_contributions string:
    • max_debts_owed_expenditures string:
    • report_type array: Report type; prefix with "-" to exclude. Name of report where the underlying data comes from:
    • min_party_coordinated_expenditures string:
    • max_independent_expenditures string:
    • max_receipts_amount string:
    • candidate_id string:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • max_disbursements_amount string:
    • type array: The one-letter type code of the organization:
    • max_cash_on_hand_end_period_amount string:
    • min_cash_on_hand_end_period_amount string:
    • committee_id required string:

Output

committee.committee_id.totals.get

This endpoint provides information about a committee's Form 3, Form 3X, or Form 3P financial reports, which are aggregated by two-year period. We refer to two-year periods as a cycle.

The cycle is named after the even-numbered year and includes the year before it. To obtain totals from 2013 and 2014, you would use 2014. In odd-numbered years, the current cycle is the next year — for example, in 2015, the current cycle is 2016.

For presidential and Senate candidates, multiple two-year cycles exist between elections.

Parameter full_election is replaced by election_full. Please use election_full instead.

fec_gov.committee.committee_id.totals.get({
  "api_key": "",
  "committee_id": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • cycle array:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • page integer: For paginating through results, starting at page 1
    • sort string: Provide a field to sort by. Use - for descending order.
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • designation string: The one-letter designation code of the organization:
    • type string: The one-letter type code of the organization:
    • committee_id required string:

Output

committees.get

Fetch basic information about committees and filers. Use parameters to filter for particular characteristics.

fec_gov.committees.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • cycle array:
    • max_last_f1_date string: Filter for committees whose latest Form 1 was received on or before this date.
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • sponsor_candidate_id array:
    • min_first_file_date string: Filter for committees whose first filing was received on or after this date.
    • treasurer_name array: Name of the Committee's treasurer. If multiple treasurers for the committee, the most recent treasurer will be shown.
    • max_first_file_date string: Filter for committees whose first filing was received on or before this date.
    • api_key required string:
    • committee_id array:
    • party array: Three-letter code for the party affiliated with a candidate or committee. For example, DEM for Democratic Party and REP for Republican Party.
    • sort string: Provide a field to sort by. Use - for descending order.
    • candidate_id array:
    • filing_frequency array: The one-letter
    • committee_type array: The one-letter type code of the organization:
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • organization_type array: The one-letter code for the kind for organization:
    • year array: A year that the committee was active— (after original registration date or filing but before expiration date)
    • page integer: For paginating through results, starting at page 1
    • state array: US state or territory
    • q array: The name of the committee. If a committee changes its name, the most recent name will be shown. Committee names are not unique. Use committee_id for looking up records.
    • sort_nulls_last boolean: Toggle that sorts null values last
    • min_last_f1_date string: Filter for committees whose latest Form 1 was received on or after this date.
    • designation array: The one-letter designation code of the organization:

Output

communication_costs.get

Deprecation notice: This endpoint will be replaced with a new endpoint /communication_costs/, so that the pagination schema will be in line with the other endpoints sharing the "communication cost" tag.

52 U.S.C. 30118 allows "communications by a corporation to its stockholders and executive or administrative personnel and their families or by a labor organization to its members and their families on any subject," including the express advocacy of the election or defeat of any Federal candidate. The costs of such communications must be reported to the Federal Election Commission under certain circumstances.

fec_gov.communication_costs.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • max_amount string: Filter for all amounts less than a value.
    • line_number string: Filter for form and line number using the following format: FORM-LINENUMBER. For example an argument such as F3X-16 would filter down to all entries from form F3X line number 16.
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • min_image_number string
    • committee_id array:
    • min_date string: Minimum date
    • sort string: Provide a field to sort by. Use - for descending order.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • image_number array: The image number of the page where the schedule item is reported
    • page integer: For paginating through results, starting at page 1
    • max_image_number string
    • min_amount string: Filter for all amounts greater than a value.
    • support_oppose_indicator array: Support or opposition
    • max_date string: Maximum date
    • candidate_id array:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:

Output

communication_costs.get

52 U.S.C. 30118 allows "communications by a corporation to its stockholders and executive or administrative personnel and their families or by a labor organization to its members and their families on any subject," including the express advocacy of the election or defeat of any Federal candidate. The costs of such communications must be reported to the Federal Election Commission under certain circumstances.

fec_gov.communication_costs.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • max_amount string: Filter for all amounts less than a value.
    • line_number string: Filter for form and line number using the following format: FORM-LINENUMBER. For example an argument such as F3X-16 would filter down to all entries from form F3X line number 16.
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • min_image_number string
    • committee_id array:
    • min_date string: Minimum date
    • sort string: Provide a field to sort by. Use - for descending order.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • image_number array: The image number of the page where the schedule item is reported
    • page integer: For paginating through results, starting at page 1
    • max_image_number string
    • min_amount string: Filter for all amounts greater than a value.
    • support_oppose_indicator array: Support or opposition
    • max_date string: Maximum date
    • candidate_id array:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:

Output

communication_costs.aggregates.get

Communication cost aggregated by candidate ID and committee ID.

fec_gov.communication_costs.aggregates.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • cycle array:
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • page integer: For paginating through results, starting at page 1
    • support_oppose_indicator string (values: S, O): Support or opposition
    • committee_id array:
    • candidate_id array:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • sort string: Provide a field to sort by. Use - for descending order.

Output

communication_costs.by_candidate.get

Communication cost aggregated by candidate ID and committee ID.

fec_gov.communication_costs.by_candidate.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • cycle array:
    • election_full boolean: True indicates that full election period of a candidate.
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • office string (values: house, senate, president): Federal office candidate runs for: H, S or P
    • page integer: For paginating through results, starting at page 1
    • district string: Two-digit US House distirict of the office the candidate is running for. Presidential, Senate and House at-large candidates will have District 00.
    • state string: US state or territory where a candidate runs for office
    • candidate_id array:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • sort string: Provide a field to sort by. Use - for descending order.
    • support_oppose string (values: S, O): Support or opposition

Output

communication_costs.totals.by_candidate.get

Total communications costs aggregated across committees on supported or opposed candidates by cycle or candidate election year.

fec_gov.communication_costs.totals.by_candidate.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • cycle array:
    • election_full boolean: True indicates that full election period of a candidate.
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • page integer: For paginating through results, starting at page 1
    • candidate_id array:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • sort string: Provide a field to sort by. Use - for descending order.

Output

efile.filings.get

Basic information about electronic files coming into the FEC, posted as they are received.

fec_gov.efile.filings.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • min_receipt_date string:
    • page integer: For paginating through results, starting at page 1
    • api_key required string:
    • file_number array: Filing ID number
    • committee_id array:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • max_receipt_date string:
    • sort string: Provide a field to sort by. Use - for descending order.

Output

efile.reports.house_senate.get

Key financial data reported periodically by committees as they are reported. This feed includes summary information from the the House F3 reports, the presidential F3p reports and the PAC and party F3x reports.

Generally, committees file reports on a quarterly or monthly basis, but some must also submit a report 12 days before primary elections. Therefore, during the primary season, the period covered by this file may be different for different committees. These totals also incorporate any changes made by committees, if any report covering the period is amended.

DISCLAIMER: The field labels contained within this resource are subject to change. We are attempting to succinctly label these fields while conveying clear meaning to ensure accessibility for all users.

fec_gov.efile.reports.house_senate.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • min_receipt_date string:
    • page integer: For paginating through results, starting at page 1
    • api_key required string:
    • file_number array: Filing ID number
    • committee_id array:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • max_receipt_date string:
    • sort string: Provide a field to sort by. Use - for descending order.

Output

efile.reports.pac_party.get

Key financial data reported periodically by committees as they are reported. This feed includes summary information from the the House F3 reports, the presidential F3p reports and the PAC and party F3x reports.

Generally, committees file reports on a quarterly or monthly basis, but some must also submit a report 12 days before primary elections. Therefore, during the primary season, the period covered by this file may be different for different committees. These totals also incorporate any changes made by committees, if any report covering the period is amended.

DISCLAIMER: The field labels contained within this resource are subject to change. We are attempting to succinctly label these fields while conveying clear meaning to ensure accessibility for all users.

fec_gov.efile.reports.pac_party.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • min_receipt_date string:
    • page integer: For paginating through results, starting at page 1
    • api_key required string:
    • file_number array: Filing ID number
    • committee_id array:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • max_receipt_date string:
    • sort string: Provide a field to sort by. Use - for descending order.

Output

efile.reports.presidential.get

Key financial data reported periodically by committees as they are reported. This feed includes summary information from the the House F3 reports, the presidential F3p reports and the PAC and party F3x reports.

Generally, committees file reports on a quarterly or monthly basis, but some must also submit a report 12 days before primary elections. Therefore, during the primary season, the period covered by this file may be different for different committees. These totals also incorporate any changes made by committees, if any report covering the period is amended.

DISCLAIMER: The field labels contained within this resource are subject to change. We are attempting to succinctly label these fields while conveying clear meaning to ensure accessibility for all users.

fec_gov.efile.reports.presidential.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • min_receipt_date string:
    • page integer: For paginating through results, starting at page 1
    • api_key required string:
    • file_number array: Filing ID number
    • committee_id array:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • max_receipt_date string:
    • sort string: Provide a field to sort by. Use - for descending order.

Output

election_dates.get

FEC election dates since 1995.

fec_gov.election_dates.get({
  "api_key": ""
}, context)

Input

  • input object
    • min_primary_general_date string:
    • election_state array:
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • office_sought array:
    • max_primary_general_date string:
    • sort string: Provide a field to sort by. Use - for descending order.
    • election_type_id array:
    • max_update_date string:
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • election_district array:
    • max_create_date string:
    • election_year array: Year of election
    • max_election_date string:
    • page integer: For paginating through results, starting at page 1
    • min_update_date string:
    • election_party array:
    • min_create_date string:
    • min_election_date string:
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:

Output

electioneering.get

An electioneering communication is any broadcast, cable or satellite communication that fulfills each of the following conditions:

The communication refers to a clearly identified federal candidate.

The communication is publicly distributed by a television station, radio station, cable television system or satellite system for a fee.

The communication is distributed within 60 days prior to a general election or 30 days prior to a primary election to federal office.

fec_gov.electioneering.get({
  "api_key": ""
}, context)

Input

  • input object
    • per_page integer: The number of results returned per page. Defaults to 20.
    • sort_null_only boolean: Toggle that filters out all rows having sort column that is non-null
    • max_amount string: Filter for all amounts less than a value.
    • sort_hide_null boolean: Hide null values on sorted column(s).
    • page integer: For paginating through results, starting at page 1
    • min_amount string: Filter for all amounts greater than a value.
    • description string
    • report_year array:
    • committee_id array:
    • min_date string: Minimum disbursement date
    • max_date string: Maximum disbursement date
    • sort_nulls_last boolean: Toggle that sorts null values last
    • api_key required string:
    • sort string: Provide a field to sort by. Use - for descending order.
    • candidate_id array:
    • last_index integer: Index of last result from previous page

Output

elect