[Jefferson Image] DIRECT LINKS TO THOMAS DOCUMENTS
| GET Links | - | POST Links |

Occasionally Web site developers may wish to build into their own pages pre-programmed, encapsulated searches which link directly to one specific THOMAS document (e.g., the full text of a enrolled bill), or to a set of documents (e.g., all bills sponsored by a Member this Congress) -- without requiring users to come to the THOMAS Web site to execute the search.

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.

  1. Making a link to the full text of a bill:
    <a href="http://thomas.loc.gov/cgi-bin/query/z?c104:h.r.1234:">H.R. 1234</A>
    Hotlink corresponding to above syntax: H.R. 1234

  2. Making a link to a certain version of a bill:
    <a href="http://thomas.loc.gov/cgi-bin/query/z?c104:s.377.enr:">S. 377, Enrolled Version</A>
    Hotlink corresponding to above syntax: S. 377, Enrolled Version
    List of bill version file extensions.

  3. Making a link to the Bill Summary and Status record for a bill:
    <a href="http://thomas.loc.gov/cgi-bin/bdquery/z?d104:h.r.1234:">H.R. 1234</A>
    Hotlink corresponding to above syntax: H.R. 1234

  4. Making a link to all bills sponsored by a certain Member of Congress:
    <a href="http://thomas.loc.gov/cgi-bin/bdquery/R?d104:FLD003:@1(rep+ehlers):">Bills sponsored by Rep. Ehlers</A>
    Hotlink corresponding to above syntax: Bills sponsored by Rep. Ehlers

  5. Making a link to all bills referred to, reported from, or orginating in a committee:
    <a href="http://thomas.loc.gov/cgi-bin/bdquery/R?d104:FLD005:@3(transportation+and+infrastructure):"> House Transportation and Infrastructure Bills</A>
    Hotlink corresponding to above syntax: House Transportation and Infrastructure Bills

  6. Making a link to a Congressional Record search:
    <a href="http://thomas.loc.gov/cgi-bin/query/r?r104:@phrase(post+office):"> Congressional Record search for Post Office</A>
    Hotlink corresponding to above syntax: Congressional Record search for Post Office

    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.

  7. Making a link to a Congressional Record document:

    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

    Since the Congressional Record starts numbering its "H," "S," "E," and "D" pages (House, Senate, Extensions of Remarks and Daily Digest) at "1" at the beginning of every session (NOT every Congress), the second session pages are differentiated from the first session pages of the same Congress in THOMAS by adding 50,000 to the page number. Thus, page H1564 is coded 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.

  8. Retrieving Congressional Record passages by a speaker:

    <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

  9. Making a link to a Congressional Record Index topic:
    <a href="http://thomas.loc.gov/cgi-bin/query/r?i104:@FIELD(TITLE+@3(committees+house)+):">Committees of the House</A>
    Hotlink corresponding to above syntax: Committees of the House

  10. Making a link to a House committee report:
    <a href="http://thomas.loc.gov/cgi-bin/cpquery/z?cp104:hr189.104:">House Committee Report 104-89</A>
    Hotlink corresponding to above syntax: House Committee Report 104-89

  11. Making a link to a Senate committee report:
    <a href="http://thomas.loc.gov/cgi-bin/cpquery/z?cp104:sr51.104:">Senate Committee Report 104-51</A>
    Hotlink corresponding to above syntax: Senate Commitee Report 104-51

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.

  1. Making a link to all bills sponsored by a certain Member:
    <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:

  2. Making a link to all House Agriculture Committee Reports in the 104th Congress:
    <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:

  3. Making links to reports on partial birth abortions in the Committee Reports files with word/phrase text search:
    <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:


[THOMAS Home] [Feedback] [About THOMAS]

Last Update Thur Apr 17 1997