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

Re: [govtrack] Best API for getting congressional bills?

Expand Messages
  • 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 1 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 2 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.