Skip to main content

View Post [edit]

Poster: Pablo Stafforini Date: Mar 3, 2024 8:34am
Forum: general Subject: Using the CLI to search for books available for borrow or download

I would like to use the ia CLI (https://archive.org/developers/internetarchive/cli.html) to restrict search results to books that can be borrowed or downloaded.

The closest I found was to add the element

loans__status__status:AVAILABLE

For instance,

ia search 'creator:[author] AND title:[title] AND loans__status__status:AVAILABLE'

which will list all books with authors matching [author] and titles matching [title], apparently excluding books that are not borrowable or downloadable. However, such a query still includes books that are not in fact accessible. For example,

ia search 'creator:bloom AND title:how pleasure works AND loans__status__status:AVAILABLE'

will return one result which is an item (https://archive.org/details/howpleasureworks00paul) that says "Borrow Unavailable". (If one tries to download this title, an encrypted PDF will be downloaded.)

Is there an alternative way of restricting search results that would not include these false positives?
This post was modified by Pablo Stafforini on 2024-03-03 16:34:09

Reply [edit]

Poster: Jeff Kaplan Date: Mar 4, 2024 12:57am
Forum: general Subject: Re: Using the CLI to search for books available for borrow or download

try adding:
AND collection:inlibrary