OpenSecrets

FREE
By stefan.skliarov
Updated 4 months ago
News, Media
1.2/10
Popularity Score
422ms
Latency
100%
Success Rate

OpenSecrets API Documentation

OpenSecrets is the nation's top resource for clear and unbiased information.

View API Details
POSTgetCandidateContributors
POSTgetCandidateIndustries
POSTgetCandidateSector
POSTgetCandidateSummary
POSTgetIndustryRaisedByMember
POSTgetLegislators
POSTgetMemberPFDprofile
POSTgetOrganization
POSTgetOrganizationSummary
POSTgetSingleIndustryCandidateData
POSTgetCandidateContributors

Provides the top organizations contributing to specified politician

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
cidSTRING
REQUIREDCRP CandidateID
apiKeyCREDENTIALS
REQUIREDApi key obtained from Opensecrets
Optional Parameters
cycleSTRING
OPTIONAL2012, 2014, 2016; leave blank for latest cycle
Code Snippet
unirest.post("https://OpenSecretsstefan-skliarovV1.p.rapidapi.com/getCandidateContributors")
.header("X-RapidAPI-Host", "OpenSecretsstefan-skliarovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://OpenSecretsstefan-skliarovV1.p.rapidapi.com/getCandidateContributors
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://OpenSecretsstefan-skliarovV1.p.rapidapi.com/getCandidateContributors")
.header("X-RapidAPI-Host", "OpenSecretsstefan-skliarovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication