Beresta

Help

Google Books key

Beresta fetches book details — publisher, year, description, cover — from Google Books and Open Library. Without a key, Google refuses, so it needs a key of your own. Here is how to get one and what happens to it afterwards.

Why a key

Beresta asks the Web for book details only when you press Search in the “Book details from the Web” sheet. Open Library answers anyone. Google Books wants every request to carry a key or a token — its Books API guide says so. Requests without a key share one common daily limit, and that limit is used up: Google answers with code 429, and Beresta says “Google Books refused: the daily limit for requests without a key is used up”.

With your own key you get your own limit, shared with nobody.

How to get a key

  1. Open console.cloud.google.com and sign in with your Google account.
  2. Create a project: the Manage resources page → Create project. Any name will do, for example “Beresta”. Press Create and pick the new project in the list at the top of the console.
  3. Turn on the Books API: open the Books API in the API Library and press Enable. Check that the new project is the one selected at the top.
  4. Open the Credentials page, press Create credentials and choose API key.
  5. Restrict the key to the Books API alone: under API restrictions choose Restrict key, tick Books API and press Create. If the key already exists without a restriction, click its name on the Credentials page, do the same and press Save. That way the key opens nothing else in your project, even if it ends up in someone else’s hands.
  6. Copy the key from the API key created window — a long string of letters and digits. Losing it is no disaster: the key stays visible on the Credentials page.

The steps follow Google’s guide to API keys. Google rearranges the console now and then; if a label does not match, write to me and I will fix the page.

Where to enter the key

On Mac, iPhone and iPad the key field is there from version 1.6. On a Mac: Settings → Library → the “Details from the Web” block → the “Google Books key” field, then “Save Key”. On iPhone and iPad: Settings → the “Details from the Web” section, the same field and the same button. The row below the field will say “A key is set”.

In the Linux beta the way is: Settings → OPDS Catalogs → the “Details from the Web” group → the “Google Books key” field. Paste the key and press the tick on the right of the field.

Once entered, the key is no longer shown in the field — only that row tells you it is there. To remove it, use “Forget the key” in the same place.

Where the key lives

Only on your device. On Mac, iPhone and iPad it is kept in that device’s Keychain and is not synced through iCloud. On Linux it is kept in the desktop keyring (through libsecret — usually GNOME Keyring). It never goes into the library database, the settings file or the sync between devices, so each device gets the key entered separately.

On Linux, if there is no keyring — say, the app runs without a desktop session — the key lives in memory until Beresta closes. The app tells you so plainly: “The keyring is unavailable — the key lives until Beresta closes”.

What goes to Google

Only when you press Search, and only to Google Books: the book’s title and author, the ISBN if you typed one, and your key. Open Library gets the same title, author and ISBN plus the book’s language code, and never the key. Showing the covers it found means more requests to books.google.com or covers.openlibrary.org.

Your library, your other books and any device identifier stay put. Requests go without cookies and without a cache. Google sees the address of your connection, as any website does.

What it costs

Google asks no money for the key or for Books API requests — at least, its guide says nothing about payment. If the console asks you to add a card, write to me: the rules have changed and this page needs fixing.

The daily limit of your key is in the console: on the Books API page, in the quotas tab (Quotas). I give no number here: Google’s guide names none, and a measurement on someone else’s project says nothing about yours.

If Beresta says the key was not accepted

“Google Books did not accept the key” with a response code means one of three things: the Books API is not enabled in the project where the key was created; the key’s restrictions allow a different API; the key was not copied whole. Check all three and enter the key again.

“The daily request limit of your key is used up” means your own limit for today has run out. Wait until the next day.

To revoke the key, delete it on the Credentials page. According to Google’s guide, a deleted key can be restored within 30 days.

Updated 20261023.