Hi Joe,

both linked data and sparql are REST. I guess what you are looking for is some sort of swagger/json API, which sometimes aren't real REST.

SPARQL is really the way to go, especially, if you already have the URI. First do:

SELECT distinct ?p count(?p) as?count {
<http://dbpedia.org/resource/Source_(game_engine)> ?p ?o
} order by desc (?count)

https://dbpedia.org/snorql/?query=SELECT+distinct+%3Fp+count%28%3Fp%29+as%3Fcount+%7B+%0D%0A%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FSource_%28game_engine%29%3E+%3Fp+%3Fo%0D%0A%7D+order+by+desc+%28%3Fcount%29+

then select the props you need:

SELECT * {
OPTIONAL { <http://dbpedia.org/resource/Source_(game_engine)> <http://dbpedia.org/ontology/license> ?license . } OPTIONAL { <http://dbpedia.org/resource/Source_(game_engine)> <http://dbpedia.org/ontology/programmingLanguage> ?pl . }
}

https://dbpedia.org/snorql/?query=SELECT+*+%7B+%0D%0AOPTIONAL+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FSource_%28game_engine%29%3E+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2Flicense%3E+%3Flicense+.+%7D%0D%0AOPTIONAL+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FSource_%28game_engine%29%3E++%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FprogrammingLanguage%3E+%3Fpl+.+%7D%0D%0A%7D+

here is a list of all accept headers for SPARQL on dbpedia.org/sparql

text/html
text/x-html+tr
auto
application/vnd.ms-excel
application/sparql-results+xml
application/sparql-results+json
application/javascript
text/turtle
application/rdf+xml
text/plain
text/csv
text/tab-separated-values

you can also query 1000 uris at once, if you rewrite the query a bit or let chatgpt do it. Not sure how to get the language.

https://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=SELECT+*+%7B%0D%0AOPTIONAL+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FSource_%28game_engine%29%3E+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2Flicense%3E+%3Flicense+.+%7D%0D%0AOPTIONAL+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FSource_%28game_engine%29%3E++%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FprogrammingLanguage%3E+%3Fpl+.+%7D%0D%0A%7D+&format=text%2Fhtml&timeout=30000&signal_void=on&signal_unconnected=on

-- Sebastian


On 06.04.25 11:54, Martynas Jusevičius wrote:
DBpedia also supports Linked Data. You can request RDF formats using
the resource (not the page) URIs, for example:

curl -L -H "Accept: text/turtle"
'http://dbpedia.org/resource/Source_(game_engine)'

On Sun, Apr 6, 2025 at 3:07 AM joe Alambert <joealamber...@gmail.com> wrote:
I finally decided to migrate from sparql client.

Best regards.

On Sat, Apr 5, 2025 at 9:08 PM joe Alambert <joealamber...@gmail.com> wrote:
Hello.
here is
I want to use an rest api (if possible, not spark) to get the language, license 
and programming language of a game engine page found previously with the lookup 
api. For example the page https://dbpedia.org/page/Source_(game_engine) should 
return C++, etc..

Is there a rest api already rxisting please.?


BEst regards.
_______________________________________________
DBpedia-discussion mailing list
DBpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

_______________________________________________
DBpedia-discussion mailing list
DBpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion


_______________________________________________
DBpedia-discussion mailing list
DBpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to