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

Re: [govtrack] Question about Bill Search

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