So i have this page id 12517871: https://fr.wikipedia.org/wiki?curid=12517871
I would like to get the identifiers from the bottom here https://www.wikidata.org/wiki/Q64007200
Using sparql, but i don't know how to do so.
I know i must use something like
SELECT ?sitelink ?itemLabel ?sitelinkLabel ?article ?cid WHERE {
?sitelink schema:isPartOf <https://fr.wikipedia.org/>.
}
but then i don't know how to search by page id and how to get the identifiers (imdb, allocine ..)
thanks
edit: i'm using this query https://w.wiki/GD5 but it randomly return nothing. To test this randomness, change the number on "limit"
SELECT ?propertyclaim ?value ?item WHERE {
hint:Query hint:optimizer "None" .
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "fr.wikipedia.org" .
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam mwapi:generator "revisions" .
bd:serviceParam mwapi:pageids "12148688" .
?item_ wikibase:apiOutputItem mwapi:item .
bd:serviceParam wikibase:limit 3
}
BIND (COALESCE(?item_, " ") AS ?item)
?item ?propertyclaim ?value .
?property wikibase:directClaim ?propertyclaim .
?property wikibase:propertyType wikibase:ExternalId .
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en". }}