query-d3bb3891267ed5872fa8f201cc3e0b2e

rq turtle/ttl

From Wikipedia URL to Wikidata Item 10:46, 19 February 2020 (UTC)) talk (René La contemporaineHi, I have a hundred Wikipedia URL in a google sheet and I'd like to have a fast way to get their équivalent Wikidata Item Q number (I of course know how to du this for an individual article). My URL come from the french Wikipedia (fr.wikipedia.org). Could someone write me a SPARQL request in which I could dump my URL and get the Q items as a result in a column ?--11:40, 19 February 2020 (UTC)) talk (René La contemporaine So I tried to follow your procedure. 1)I filled "frwiki" in "First column are articles from " 2) I copy/pasted from a sheet an example with frwikiURL[TAB]P1[TAB]Q0 but the only result I got is MISSING P1 Q0. What did I do wrong ?--Jura 11:03, 19 February 2020 (UTC) Jura followed by a tab, P1, Q0 and fill in "frwiki" in "First column are articles from ". As P1 doesn't exist it will just convert them. --- https://tools.wmflabs.org/wikidata-todo/quick_statements.phpYou could dump the page titles them on Try: Comte Adrien de Germiny P1 Q0 Comte de Chambord (rose) P1 Q0 Comtesse de Cassagne P1 Q0 Comtesse de Leusse (rose) P1 Q0 Condesa de Mayalde P1 Q0 Constance Spry (rose) P1 Q0 Coquette des Blanches P1 Q0 Crimson Glory (rose) P1 Q0 Crimson Rambler P1 Q0 Cuisse de Nymphe P1 Q0 Cuisse de Nymphe émue P1 Q0 . fr:Catégorie:Cultivar_de_rosiersome from It gets you: Q60965024 P1 Q0 Q60964318 P1 Q0 Q16473337 P1 Q0 Q64030567 P1 Q0 Q50952180 P1 Q0 Q16626285 P1 Q0 Q64030568 P1 Q0 Q63067618 P1 Q0 Q60964381 P1 Q0 MISSING P1 Q0 Q3007030 P1 Q0 11:46, 19 February 2020 (UTC) Jura --- https://fr.wikipedia.org/w/index.php?title=Cuisse_de_Nymphe&action=infoThe missing one doesn't have an item associated with it. See 11:57, 19 February 2020 (UTC)) talk (René La contemporaine example). So would there be a way to do it directrly with URL ?--https://fr.wikipedia.org/wiki/Andr%C3%A9_Ch%C3%A9radame Now I understand ! I don't have the article's names, I have the URLs. It works when I enter the names. I can easily transform URL in names and follow the process except for certain URL where diacritics mess up the names (Jura11:53, 19 February 2020 (UTC) Jura --- https://tools.wmflabs.org/wikidata-todo/linked_items.phpThere is also a dedicated tool for that at trouver un item Wikidata à partir de l'URL fr.wikipedia

Use at

PREFIX schema: <http://schema.org/>
SELECT *
{
  VALUES ?frwiki {
<https://fr.wikipedia.org/wiki/Andr%C3%A9_Ch%C3%A9radame>
<https://fr.wikipedia.org/wiki/Andr%C3%A9_Ch%C3%A9radame>
}
  ?frwiki schema:about ?item ; schema:name ?name 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?frwiki"):::projected v2("?item"):::projected v3("?name"):::projected bind0[/VALUES ?frwiki/] bind0-->v1 bind00([https://fr.wikipedia.org/wiki/Andr%C3%A9_Ch%C3%A9radame]) bind00 --> bind0 bind01([https://fr.wikipedia.org/wiki/Andr%C3%A9_Ch%C3%A9radame]) bind01 --> bind0 v1 --"schema:about"--> v2 v1 --"schema:name"--> v3