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

Question about Bill Search

Expand Messages
  • Joe Germuska
    Josh: For the bill search API (e.g. http://www.govtrack.us/congress/billsearch_api.xpd?q=iraq+war) it seems that there s a mechanism for redirecting an exact
    Message 1 of 2 , Mar 2, 2009
      Josh:

      For the bill search API (e.g. http://www.govtrack.us/congress/billsearch_api.xpd?q=iraq+war) it seems that there's a mechanism for redirecting an exact hit (e.g. http://www.govtrack.us/congress/billsearch_api.xpd?q=hr801) to an HTML page.

      I note also that it doesn't handle queries that use the unique ID format used elsewhere on GovTrack (e.g. http://govtrack.us/congress/billsearch_api.xpd?q=h111-801)  In this case, it infers a bill "H.R. 111801"

      How would you feel about changing that?  I have a case where I want to occasionally deference a coded reference to a bill and just want to look up it's title.  I could scrape the HTML returned from the redirect, but it would be cleaner to get XML, and to get it using the same ID.  (If it mattered, perhaps an alternate parameter name rather than "q" could be used when the query is expected to get an exact hit.)  

      Is there a service other than govtrack which provides this?  I'm not recalling it from any of the other open gov APIs.

      BTW, this is in service of an idea for applying "machine tags" to my Delicious bookmarks.  I know that machine tags are so 2007 and hardly anyone seems to use Delicious anymore either, but I have an operation which aggregates daily Delicious bookmarks into a blog post, and I like to add references to related resources (so far mostly just books...).  So I'm going to start using tags of the form "usgov:bill=h111-801" to make it clear when a page I bookmark references a specific piece of legislation.  I know consensual machine tags have their flaws and all, but they still interest me.  

      Joe

      -- 
      Joe Germuska
      Joe@... * http://blog.germuska.com    

      "I felt so good I told the leader how to follow."
      -- Sly Stone 

    • Josh Tauberer
      ... That s essentially a mistake because the API and non-API versions use the same routine internally. However, it s not meant as a resolution mechanism for my
      Message 2 of 2 , Mar 6, 2009
        Joe Germuska wrote:
        > For the bill search API
        > (e.g. http://www.govtrack.us/congress/billsearch_api.xpd?q=iraq+war) it
        > seems that there's a mechanism for redirecting an exact hit
        > (e.g. http://www.govtrack.us/congress/billsearch_api.xpd?q=hr801) to an
        > HTML page.

        That's essentially a mistake because the API and non-API versions use
        the same routine internally. However, it's not meant as a resolution
        mechanism for my encoded bill numbers like that. If you have that, just
        access the page you need directly...

        > How would you feel about changing that? I have a case where I want to
        > occasionally deference a coded reference to a bill and just want to look
        > up it's title. I could scrape the HTML returned from the redirect, but
        > it would be cleaner to get XML, and to get it using the same ID. (If it
        > mattered, perhaps an alternate parameter name rather than "q" could be
        > used when the query is expected to get an exact hit.)

        You should access the bill XML file in the /data directory instead (e.g.
        /data/us/110/bills/hr108.xml).

        I've also corrected billsearch_api so that if a formatted bill number
        like H.R. 1024 is given, it doesn't do a redirect but instead returns
        the bill as a search result.

        Josh
      Your message has been successfully submitted and would be delivered to recipients shortly.