Re: [govtrack] Question about Bill Search
- Joe Germuska wrote:
> For the bill search APIThat's essentially a mistake because the API and non-API versions use
> (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.
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 toYou should access the bill XML file in the /data directory instead (e.g.
> 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.)
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.