Sparql query by AAT ID from within OpenRefine?

Skip to first unread message

Rolf Blijleven

Mar 7, 2023, 10:43:52 AM3/7/23
to Getty Vocabularies as Linked Open Data

I'm reconciling a list of terms using OpenRefine and the GVP reconciliation service. This works, I get links to GVP/AAT data. I can then select the best match, so that I have only one link per term. I then want to extract only the dutch scopenote for that concept. From within OpenRefine, this doesn't seem to work (anymore).

In GVP's Sparql endpoint (, this does exactly what I want.

    select * {
      aat:300212636 skos:scopeNote [dct:language gvp_lang:nl; rdf:value ?scope_note]

Copy-pasting this line in the browser works too: * {aat:300212636 skos:scopeNote [dct:language gvp_lang:nl; rdf:value ?scope_note]}

The question is: how to do this from OpenRefine using Add column by fetching urls. 

As per documentation, I think I need to replace all spaces in the query by a plus, and replace the value that I'm looking for by either `'+ value + '` or `' + escape(value, 'url') +'`.

Like this:*{aat:' + value + '+skos:scopeNote+[dct:language+gvp_lang:nl;+rdf:value+?scope_note]}


'*{aat:' + escape(value, 'url') + '+skos:scopeNote+[dct:language+gvp_lang:nl;+rdf:value+?scope_note]}'

However I'm not getting any response at all this way. I tried setting the accept header like this (with and without quotes), to no avail (screenshot attached). 

"Accept-Profile: <>"

I think the URL just doesn't give any response, not even an error code. I also tried using a simple google url, that does return html soup. 

What am I doing wrong? 

Many thanks, 

Schermafbeelding 2023-03-07 164253.png

Rolf Blijleven

Mar 8, 2023, 10:52:29 AM3/8/23
to Getty Vocabularies as Linked Open Data
This issue is resolved, it boils down to escaping the query in OpenRefine. Full detail here.

Case closed.. 

Op dinsdag 7 maart 2023 om 16:43:52 UTC+1 schreef Rolf Blijleven:
Reply all
Reply to author
0 new messages