Topic on Talk:Wikidata Query Service/User Manual/MWAPI

read imageinfo metadata?

11
Jura1 (talkcontribs)

Can this be done? e.g. with

      bd:serviceParam wikibase:endpoint "commons.wikimedia.org" .
      bd:serviceParam wikibase:api "Generator" .
      bd:serviceParam mwapi:generator "imageinfo" .
      bd:serviceParam mwapi:gcmprop "metadata" .      
      bd:serviceParam mwapi:gcmtitle "File:Iphone 3GS grass.jpg" .
Smalyshev (WMF) (talkcontribs)

If API returns it as generator, then MWAPI service should support it.

Jura1 (talkcontribs)

Does that mean it already does (if queried correctly)

or it should do so in the future (once developed)?

Smalyshev (WMF) (talkcontribs)

Check out https://w.wiki/3p7 - is this something you've been looking for?


Smalyshev (WMF) (talkcontribs)

Unfortunately, looks like it's a bit tricky to extract metadata itself as it returns multiple values and current MWAPI syntax allows only single value per row (since SPARQL doesn't have arrays or any other structures).

Jura1 (talkcontribs)
Jura1 (talkcontribs)
Smalyshev (WMF) (talkcontribs)

Try this one: https://w.wiki/3sq

Smalyshev (WMF) (talkcontribs)
Jura1 (talkcontribs)

It seems to work, at least to get the two fields ().

I was trying to get just 1-5 files per category, but that part didn't quite work out.

Jura1 (talkcontribs)

Is there a way to get only 1-5 results for each category from the categorymembers-generator?

Reply to "read imageinfo metadata?"