Just use prop=images as a generator on
en.wikipedia.org. This will
yield the thumb urls as well as the urls of the commons pages, which
can then be fetched separately.
Licensing info is not available through the API because it's just some
text or template on the image description page; it has no meaning to
the MediaWiki software.
Roan Kattouw (Catrope)