Comment 66 for bug 236947

Revision history for this message
sancho (sancho) wrote : Re: FR: search API improvements

Hi,

Does the restful api support text searching yet?

What i'd like to be able to do is pass a string to the search and return all matching books e.g.

http://openlibrary.org/search.json?q=harry potter&*=&limit=10&offset=1

OR

http://openlibrary.org/search.json?q={"title":"harry potter" OR "authors:"harry potter"}&*=&limit=10&offset=1

This would return all details for matching books.

I'd even be happy having to do 2 queries e.g.

http://openlibrary.org/query.json?type=/type/edition&title="harry potter"&*=&limit=10&offset=1

http://openlibrary.org/query.json?type=/type/edition&authors="harry potter"&*=&limit=10&offset=1

As you can see from the links below both should return books

http://openlibrary.org/search?q=harry+potter (returns both title and author matches)

http://openlibrary.org/search?title=harry+potter

http://openlibrary.org/search?author=harry+potter

Thanks
Simon