Developers can use one of two major protocols to execute
a search on a THOMAS databases: GET
and POST
.
Below are some examples -- some using the GET
protocol,
some using the POST
protocol -- of how a Web developer
might build links into his/her Web page to THOMAS document(s)
by creating an encapsulated search.
The following examples are for documents in the 104th Congress. Replace the "104" string with "105" or "103," when applicable.
Please note that these specifications are subject to change as THOMAS itself grows and improves.
ENCAPSULATED SEARCHES USING THE
"GET" PROTOCOL
GET
links are built by embedding a URL with a valid
anchor link. The general syntax is:
<A HREF="valid URL here">Description of Link Here</A>
Note that your cursor turns into a small "hand" icon when running
your mouse over a GET
link (while it does not when using a
POST
link). Here are examples of direct
links to THOMAS documents using the
GET
protocol to encapsulate the search. These examples are
for searches in the 104th Congress. If you wish to build encapsulated
searches for the 105th Congress, substitute the string 105
for 104
in the URL.
<a href="http://thomas.loc.gov/cgi-bin/query/z?c104:h.r.1234:">H.R.
1234</A>
<a href="http://thomas.loc.gov/cgi-bin/query/z?c104:s.377.enr:">S.
377, Enrolled Version</A>
<a href="http://thomas.loc.gov/cgi-bin/bdquery/z?d104:h.r.1234:">H.R.
1234</A>
<a href="http://thomas.loc.gov/cgi-bin/bdquery/R?d104:FLD003:@1(rep+ehlers):">Bills
sponsored by Rep. Ehlers</A>
<a href="http://thomas.loc.gov/cgi-bin/bdquery/R?d104:FLD005:@3(transportation+and+infrastructure):">
House Transportation and Infrastructure Bills</A>
<a href="http://thomas.loc.gov/cgi-bin/query/r?r104:@phrase(post+office):">
Congressional Record search for Post Office</A>
Note: For more information on the syntax for a word/phrase search in INQUERY,
read The Complete Guide to Using
THOMAS Under InQuery. When making an encapsulated search in a
GET
protocol link, substitute an @ sign for the # sign in an INQUERY
search, and a + sign for a space.
Congressional Record page in the first session (1995) of the 104th Congress:
<a href="http://thomas.loc.gov/cgi-bin/query/R?r104:FLD001:H01564:">House
Page 1564</A>
Hotlink corresponding to above syntax: House
Page 1564 in the first session
H01564
in the first session, and page H1564 is coded H51564
in the second session.
Congressional Record page in the second session (1996) of the 104th Congress:
<a href="http://thomas.loc.gov/cgi-bin/query/R?r104:FLD001:H51564:">House
Page 1564</A>
Hotlink corresponding to above syntax: House
Page 1564 in the second session
Note: Because of the way the data is configured by the Government Printing Office, only a link to the "document" level (text between Bodoni dashes), not the exact page, is possible. Only after the document is displayed can the page numbers within that document be built in a table of contents for that document. Use the "Find" command of your browser to locate the page number within the document, and click on it to see the text on that page.
<a href="http://thomas.loc.gov/cgi-bin/query/r?r107:@BAND(@OD3+(mrs+clinton)))">
Congressional Record passages by Sen. Clinton</a>
Hotlink corresponding to above syntax: Congressional
Record passages by Sen. Clinton
<a href="http://thomas.loc.gov/cgi-bin/query/r?i104:@FIELD(TITLE+@3(committees+house)+):">Committees
of the House</A>
<a href="http://thomas.loc.gov/cgi-bin/cpquery/z?cp104:hr189.104:">House
Committee Report 104-89</A>
<a href="http://thomas.loc.gov/cgi-bin/cpquery/z?cp104:sr51.104:">Senate
Committee Report 104-51</A>
ENCAPSULATED SEARCHES USING THE "POST" PROTOCOL
In addition to the hypertext link using the
GET
protocol to do an encapsulated searches, Web developers may want to use
a pre-programmed POST
search. This syntax
is a little more tricky, but allows you to build a "button" (using an HTML
form) which executes the encapsulated search.
<FORM ACTION="http://thomas.loc.gov/cgi-bin/bdquery" METHOD=POST>
<input name="Dbd104" type=hidden value="d104">
<input name="srch" type=hidden value="/bss/d104query.html">
<input name="TYPE1" type=hidden value="bimp">
<input name="HMEMB" type=hidden value="MORELLA">
<input name="Sponfld" type=hidden value="SPON">
<input type="submit" value="Bills Sponsored by Rep. Morella (104th
Congress)">
</FORM>
All the values above are "boilerplate" for the Bill Summary & Status files, except:
Button that corresponds to above syntax:
<FORM ACTION="http://thomas.loc.gov/cgi-bin/cpquery" METHOD=POST>
<input type="hidden" name="querycp104" value="">
<input type="hidden" name="Section" value="All">
<input type="hidden" name="crnSection" value="None">
<input type="hidden" name="HCOMM" value="AGRICULTURE">
<input type="hidden" name="MaxDocs" value="100">
<input type="submit" value="House Agriculture Committee Reports (104th)">
</FORM>
All the values above are "boilerplate" for the Committee Reports files, except:
Button that corresponds to the above syntax:
<form action="http://thomas.loc.gov/cgi-bin/cpquery" METHOD=POST>
<input type="hidden" name="querycp104" value="partial birth abortions">
<input type="hidden" name="Section" value="All">
<input type="hidden" name="crnSection" value="None">
<input type="hidden" name="MaxDocs" value="10">
<input type="submit" value="Committee Reports on Partial Birth Abortions - 104th">
</form>
Button corresponding to the above syntax:
Last Update Thur Apr 17 1997