Template:Google Books URL/doc

This template, a wrapper for Google books, outputs a Google Books URL (web address) only, rather than a linked book title and page number. It is suitable for use in the url parameter of a citation template.

Usage
The,  ,  , and   parameters are all optional.

The id parameter is the string of twelve characters found in the specific Google Books URL after "id=" but before "&".

The p parameter may be used to link to a particular page number. page works as an alias.

An alternative parameter pg can be used for "special" pages as well as ordinary pages. For example, PR1 for the page numbered "i", or PP2 for an inside cover (check the specific circumstances as appropriate for the latter as they vary from book to book). Because the pg parameter corresponds directly to the pg parameter in the Google URL, it can also be used for ordinary pages numbered with Arabic numerals; e.g., PA10 yields the same result as 10.

As of 2022 the p and pg parameters do not seem to work if a preview is unavailable; Google Books may not support going to a page specified by number. and  do work;   to a phrase that only appears on one page will find a specific page.

The q (alias keywords) parameter may be used to search for particular keywords within the text (corresponding to the q parameter in the Google URL). Enclose phrases in quotation marks (").

The dq (alias text) parameter searches for a quoted phrase (corresponding to the dq parameter in the Google URL). Enclose phrases in quotation marks (").

In many cases when converting an existing Google Books URL, only one of the above should be used. When multiple parameters are present, the final target page is much more likely to vary over time. If linking to a specific page, only use the page parameter, and if doing a text search then do not include the page parameter.

Example 1:

creates:

Example 2:

creates:

Example 3:

creates this, which links to the bookplate on the inside cover:
 * Brackenridge, H.M.. [ History of the Western Insurrection].

Example 4:

creates this, which links to the title page complete with inscriptions:
 * Brackenridge, H.M.. [ History of the Western Insurrection].