Query DBpedia for Metadata for Books

I have an ISBN group. I want to query DBpedia and get book metadata.

I can not understand SPARQL .

Can someone tell me how can I get book metadata from DBpedia in Java?

+4
source share
2 answers

SPARQL is a query language and protocol for querying the so-called SPARQL endpoints.

A SPARQL query asking DBpedia for a book (or books) that has ISBN 0-553-05250-0, and its (or their) related properties and values ​​are as follows:

 select distinct ?book ?prop ?obj where { ?book a dbo:Book . ?book ?prop ?obj . ?book dbp:isbn ?isbn . FILTER (regex(?isbn, "0-553-05250-0")) } LIMIT 100 

See the result of the request in your browser here .

Remember that regex(?isbn, "0-553-05250-0") takes some time to evaluate. This may not work for all ISBNs because

  • Wikipedia can never have a complete ISBN list, so no DBpedia
  • the same ISBN without a dash will not match a request with a dash.

In addition, I noticed that some ISBNs are just a string of numbers and dashes; others have an β€œISBN” in it or β€œ(paperback)”.

You can send this query to the DBpedia endpoint via a web form (by visiting the endpoint using your browser) using Jena , the well-known Java toolkit for RDF and SPARQL.
Here is a query in some Java code that DBpedia asks for results and prints them on the command line (based on another question

My favorite resource is SPARQL, which is a pretty comprehensive reference. You might want to check out Jena provides documentation.

+2
source

As far as I can tell, Wikipedia does not have an ISBN search.

Wikipedia This page is for using other ISBN search engines.

Amazon.com has an ISBN search here . I could not find an API to automate ISBN searches on Amazon.

0
source

All Articles