query: SELECT ?item ?url  WHERE {
    wd:P6738 wdt:P1630 ?formatterurl .
    ?item p:P195/ps:P195 wd:Q639791 .
    ?item wdt:P31 wd:Q3305213 .   
    OPTIONAL { ?item wdt:P6738 ?id }.
    BIND(REPLACE(?id, '^(\\d+)$', CONCAT("[", ?formatterurl, " $1]")) AS ?url)  .
    } 
   LIMIT 4000