• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Google Books URL

  • Template
  • Talk
  • Language
  • Watch
  • View source
Template documentation[view] [edit] [history] [purge]
Shortcut
  • {{GBurlTemplate:GBurl}}
WarningThis template is used on approximately 5,500 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.

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.[dubious – discuss]

Usage

{{GBurl|id|p=|pg=|dq=|q=}}

The p, pg, dq, and q 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, |pg=PR1 for the page numbered "i", or |pg=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., |pg=PA10 yields the same result as |p=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. q and dq do work; dq 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).

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:

* {{cite book |last=Brackenridge |first=H.M. |title=History of the Western Insurrection |url={{GBurl|7ydCAAAAIAAJ|p=42}} |page=42 }}

creates:

  • Brackenridge, H.M. History of the Western Insurrection. p. 42.

Example 2:

{{cite book|last=Brackenridge|first=H.M.|title=History of the Western Insurrection|url={{GBurl|id=7ydCAAAAIAAJ|page=42}}|page=42}}

creates:

Brackenridge, H.M. History of the Western Insurrection. p. 42.

Example 3:

Brackenridge, H.M.. [{{GBurl|7ydCAAAAIAAJ|pg=PP2}} ''History of the Western Insurrection''].

creates this, which links to the bookplate on the inside cover:

Brackenridge, H.M.. History of the Western Insurrection.

Example 4:

Brackenridge, H.M.. [{{GBurl|7ydCAAAAIAAJ|pg=PR1}} ''History of the Western Insurrection''].

creates this, which links to the title page complete with inscriptions:

Brackenridge, H.M.. History of the Western Insurrection.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Google Books URL in articles based on its TemplateData.

TemplateData for Google Books URL

Generates a link to a specific Google Books page with optional parameters for customization.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Book IDid

Twelve characters found in the specific Google Books URL after 'id=' but before '&'.

Stringrequired
Page Anchorp

This may be used to link to a particular page number. (works as an alias).

Stringoptional
Page Typepg

Defines the type of page to link to (e.g., PR for preview, PA for specific pages).

Stringoptional
Search Querydq

A search term to highlight or focus on within the book.

Stringoptional
Queryq

A general query string to refine the search results in Google Books.

Stringoptional
Display Texttext

Custom text to display for the hyperlink. If not specified, the link defaults to the book title or ID.

Stringoptional

See also

Wikidata has the property:
  • Google Books ID (P675) (see uses)
  • {{Google books}}
  • {{Cite book}}
  • Google Books
  • WP:GBOOKS
The above documentation is transcluded from Template:Google Books URL/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Google_Books_URL&oldid=1305597013"
Last edited on 13 August 2025, at 01:08

Languages

    • Basa Bali
    • বাংলা
    • Bosanski
    • Català
    • الدارجة
    • فارسی
    • Français
    • 한국어
    • Hrvatski
    • Bahasa Indonesia
    • Íslenska
    • Lietuvių
    • Magyar
    • Македонски
    • മലയാളം
    • 日本語
    • Norsk nynorsk
    • Português
    • Română
    • Simple English
    • Slovenščina
    • Српски / srpski
    • တႆး
    • ไทย
    • Türkçe
    • Tiếng Việt
    • 中文
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited on 13 August 2025, at 01:08 (UTC).
    • Content is available under CC BY-SA 4.0 unless otherwise noted.
    • Privacy policy
    • About Wikipedia
    • Disclaimers
    • Contact Wikipedia
    • Code of Conduct
    • Developers
    • Statistics
    • Cookie statement
    • Terms of Use
    • Desktop