Skip to content

Google Books: only the search endpoint is used, so title, page count and description come back wrong or missing #2532

Description

@bent210

Summary

GoogleParser only ever calls the search endpoint (/books/v1/volumes?q=…) and uses whatever
that returns. For the same volume, Google's search response is a reduced and differently worded
record than the volume endpoint (/books/v1/volumes/{id}) — different title, different page count,
and no description at all. Because Grimmory never fetches the volume detail for the match it
picked, that information is permanently lost, and users see a much poorer result than the Google
Books web page for the same edition shows.

Evidence

Volume 6xqMjgEACAAJ (German children's book, ISBN-13 9783505138140), queried both ways:

field search endpoint ?q=… volume endpoint /{id}
title Ein Fall für Me, Mum & Mystery, Band 01 Können Geister Fahrrad fahren?
pageCount 192 187
description absent present
imageLinks present present

The search response returns the series/volume-numbering form of the title, the volume endpoint
returns the actual book title — which is also what
https://www.google.de/books/edition/_/6xqMjgEACAAJ displays.

Things I ruled out:

  • projection=full on the search endpoint — no change, identical reduced record.
  • langRestrict=de present or absent — identical results.
  • ISBN search: q=isbn:9783505138140 resolves uniquely (totalItems: 1) to the correct volume,
    but still returns the reduced record (title Ein Fall für Me, Mum & Mystery, Band 01, 192 pages,
    no description). So pinning the edition by ISBN does not recover the missing fields either.

Secondary effect: indistinguishable candidates

This book has two Google entries:

id title (volume endpoint) ISBN-13 cover
6xqMjgEACAAJ Können Geister Fahrrad fahren? 9783505138140 yes
qzvzwAEACAAJ Ein Fall für Me, Mum & Mystery, Band 01 9783505138812 no

In the search view both are titled Ein Fall für Me, Mum & Mystery, Band 01 with the same
author, so the match scoring has nothing to separate them — and one of them is a stub with no
cover and no page count. Whichever way the tie falls, the user may get the stub. Fetching the
volume detail would also make the two distinguishable before scoring.

Suggested fix

After selecting a match in GoogleParser, issue a second request to
https://www.googleapis.com/books/v1/volumes/{volumeId} and merge/prefer its volumeInfo. That is
one extra call per accepted match (not per candidate), so the quota cost is small; it could also be
limited to the single chosen result, or done lazily when the user opens the candidate.

Reproduction

Two small scripts I used, if helpful — they take an API key as the first argument and print the
comparison table above:

  • query the same term with and without langRestrict, and with projection=full
  • fetch both candidate volumes directly and run an isbn: search

Search term Grimmory built for this book, taken from its own log:

intitle:Können Geister Fahrrad fahren inauthor:Lucia Vaccarino
https://www.googleapis.com/books/v1/volumes?langRestrict=de&key=***&q=intitle:K%C3%B6nnen%20Geister%20Fahrrad%20fahren%20inauthor:Lucia%20Vaccarino&maxResults=20

Environment

  • Grimmory v3.3.3, official Docker image
  • Google provider enabled, language: de, API key set

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions