CivicFeed - Legislation

FREEMIUM
By civicfeed
Updated 4 months ago
News, Media
2/10
Popularity Score
6157ms
Latency
100%
Success Rate

CivicFeed - Legislation API Documentation

Legislation API Get information about state and federal legislative activities, including bill summaries, votes, sponsorships and state legislator information.

This data is gathered directly from the states and Congress.gov and made available through both a REST and GraphQL API.

View API Details
GETMeta
GETState Meta
GETBills
GETBill - Details
GETLegislators
GETLegislator - Details
GETMeta

This endpoint returns a list of all states with data available and basic metadata about their status.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Code Snippet
unirest.get("https://civicfeed-civicfeed-legislation-v1.p.rapidapi.com/legislation/metadata")
.header("X-RapidAPI-Host", "civicfeed-civicfeed-legislation-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://civicfeed-civicfeed-legislation-v1.p.rapidapi.com/legislation/metadata
Request Method: GET
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.get("https://civicfeed-civicfeed-legislation-v1.p.rapidapi.com/legislation/metadata")
.header("X-RapidAPI-Host", "civicfeed-civicfeed-legislation-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication