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.
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.