Loading ...
Sorry, an error occurred while loading the content.

Best API for getting congressional bills?

Expand Messages
  • pito
    For some reason I thought that govtrack.us had an api where I could lookup info on bills. Specifically, I am interested in being to get information about house
    Message 1 of 5 , Mar 26, 2009
    • 0 Attachment
      For some reason I thought that govtrack.us had an api where I could
      lookup info on bills.

      Specifically, I am interested in being to get information about house
      and senate bills 'submitted' over a date range (e.g. over the last 7
      days)

      The closest govtrack.us api I can find is: http://www.govtrack.us/congress/billsearch_api.xpd?q=iraq+war

      Does anyone know of other parameters that can be tacked on other than ?q=iraq+war? Because as it is above, I don't know how I could get all the bills dated sometime in the last 7 days.

      And any other APIs that anyone is aware of for this purpose?

      -- Pito
    • Josh Tauberer
      This might be one of those things where you can build it yourself if you need it. :) GovTrack is open source so... If you are only looking in the past so-many
      Message 2 of 5 , Mar 26, 2009
      • 0 Attachment
        This might be one of those things where you can build it yourself if you
        need it. :) GovTrack is open source so...

        If you are only looking in the past so-many days, you could use an
        events feed, which I don't consider an API but you might still get away
        with it:
        http://www.govtrack.us/users/events.xpd?monitors=misc%3aintroducedbills

        - Josh Tauberer
        - GovTrack.us

        http://razor.occams.info

        "Yields falsehood when preceded by its quotation! Yields
        falsehood when preceded by its quotation!" Achilles to
        Tortoise (in "Godel, Escher, Bach" by Douglas Hofstadter)

        On 03/26/2009 04:11 PM, pito wrote:
        > For some reason I thought that govtrack.us had an api where I could
        > lookup info on bills.
        >
        > Specifically, I am interested in being to get information about house
        > and senate bills 'submitted' over a date range (e.g. over the last 7
        > days)
        >
        > The closest govtrack.us api I can find is: http://www.govtrack.us/congress/billsearch_api.xpd?q=iraq+war
        >
        > Does anyone know of other parameters that can be tacked on other than ?q=iraq+war? Because as it is above, I don't know how I could get all the bills dated sometime in the last 7 days.
        >
        > And any other APIs that anyone is aware of for this purpose?
        >
        > -- Pito
        >
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
      • R. Pito Salas
        Josh Thanks... I haven t looked into where govtrack.us s raw data comes from. I could indeed build it myself if that data is readily available... Or do you
        Message 3 of 5 , Mar 26, 2009
        • 0 Attachment
          Josh

          Thanks... I haven't looked into where govtrack.us's raw data comes from. I could indeed build it myself if that data is readily available... 

          Or do you mean downloading the databases from your server and querying that?

          Either way, it would certainly be feasible. 

          The problem with the feed is that I get back urls to a page on your site and then I'd have to scrape that page to get the data I want which is subobtimal...

          -- Pito
          On Mar 26, 2009, at 6:25 PM, Josh Tauberer wrote:

          This might be one of those things where you can build it yourself if you
          need it. :) GovTrack is open source so...

          If you are only looking in the past so-many days, you could use an
          events feed, which I don't consider an API but you might still get away
          with it:
          http://www.govtrack .us/users/ events.xpd? monitors= misc%3aintroduce dbills

          - Josh Tauberer
          - GovTrack.us

          http://razor. occams.info

          "Yields falsehood when preceded by its quotation! Yields
          falsehood when preceded by its quotation!" Achilles to
          Tortoise (in "Godel, Escher, Bach" by Douglas Hofstadter)

          On 03/26/2009 04:11 PM, pito wrote:
          > For some reason I thought that govtrack.us had an api where I could
          > lookup info on bills.
          >
          > Specifically, I am interested in being to get information about house
          > and senate bills 'submitted' over a date range (e.g. over the last 7
          > days)
          >
          > The closest govtrack.us api I can find is: http://www.govtrack .us/congress/ billsearch_ api.xpd?q= iraq+war
          >
          > Does anyone know of other parameters that can be tacked on other than ?q=iraq+war? Because as it is above, I don't know how I could get all the bills dated sometime in the last 7 days.
          >
          > And any other APIs that anyone is aware of for this purpose?
          >
          > -- Pito
          >
          >
          >
          >
          > ------------ --------- --------- ------
          >
          > Yahoo! Groups Links
          >
          >
          >


        • Josh Tauberer
          ... It comes from a mess. ... See http://govtrack.us/developers/data.xpd. ... That s possible too. ... No, no, you should never have to scrape GovTrack. You
          Message 4 of 5 , Mar 26, 2009
          • 0 Attachment
            > Thanks... I haven't looked into where govtrack.us's raw data comes from.

            It comes from a mess.

            > I could indeed build it myself if that data is readily available...

            See http://govtrack.us/developers/data.xpd.

            > Or do you mean downloading the databases from your server and querying that?

            That's possible too.

            > The problem with the feed is that I get back urls to a page on your site
            > and then I'd have to scrape that page to get the data I want which is
            > subobtimal...

            No, no, you should never have to scrape GovTrack. You can get bill info
            in XML if you know the bill number. See the link above.

            Josh
          • Neil Drumm
            ... This is what I do with Legislature module for Drupal. Download XML lists of everything on a schedule, and queue anything possible. In a few hours, the SQL
            Message 5 of 5 , Mar 26, 2009
            • 0 Attachment
              On Thu, Mar 26, 2009 at 4:33 PM, R. Pito Salas <rps@...> wrote:
              > Thanks... I haven't looked into where govtrack.us's raw data comes from. I
              > could indeed build it myself if that data is readily available...
              > Or do you mean downloading the databases from your server and querying that?
              > Either way, it would certainly be feasible.
              > The problem with the feed is that I get back urls to a page on your site and
              > then I'd have to scrape that page to get the data I want which is
              > subobtimal...

              This is what I do with Legislature module for Drupal. Download XML
              lists of everything on a schedule, and queue anything possible. In a
              few hours, the SQL database is complete and be queried for whatever is
              needed. This is good since I do want a database of everything. The
              module does use a RSS feed of recent votes to get updates throughout
              the day, which is fine even if it is not a proper API, the related XML
              is in predictable places.

              You can rsync to copy/update all the XML files at once. This may help
              with batch processing.

              There is the RDF API, http://www.govtrack.us/developers/rdf.xpd. I
              haven't used it, but it might be
              possible to retrieve the specific data you need with a SPARQL query.

              -Neil

              --
              Neil Drumm
              http://delocalizedham.com
            Your message has been successfully submitted and would be delivered to recipients shortly.