-1

Is it possible to search on MavenCentral (search.maven.org) by REST, so that I get the search results in JSON/XML (or some other machine readable format)?

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142

1 Answers1

1

Sure, open your Web Inspector/Developer Tools window and visit (e.g.) https://search.maven.org/artifact/org.mockito/mockito-core

Filter XHR requests and you will see which URLs to use and what the JSON response looks like.

tgdavies
  • 10,307
  • 4
  • 35
  • 40
  • You mean something like https://search.maven.org/solrsearch/select?q=g:org.mockito%20AND%20a:mockito-core&core=gav&start=0&rows=299 ? Do you know if there is any documentation about the parameters? – J Fabian Meier Jul 11 '21 at 10:04
  • I assume that this might help: https://solr.apache.org/guide/8_9/query-syntax-and-parsing.html – tgdavies Jul 11 '21 at 10:08