Maven Central Search API
Search Maven Central for Java artifacts, latest versions and coordinates with no API key. Solr-backed query syntax, tested example and the epoch-milliseconds trap.
Endpoint tested and returned HTTP 200 on 21 Aug 2026
What is the Maven Central Search API?
Maven Central exposes a public search API at `https://search.maven.org/solrsearch/select`. `GET ?q=g:com.google.guava&rows=2&wt=json` returns matching artifacts with their groupId, artifactId, latest version and packaging. No API key or account is required.
This endpoint is a thin wrapper over a Solr index, and knowing that unlocks the query syntax. Field prefixes work exactly as they do in Lucene: `g:` for groupId, `a:` for artifactId, `v:` for version, `p:` for packaging, `c:` for classifier, and they combine with `AND` and `OR`. `q=g:com.google.guava AND a:guava` is a precise lookup, while a bare term does a fuzzy match across everything.
Two behaviours surprise people. By default each result is one artifact with its `latestVersion`, but adding `core=gav` switches the index to one row per version, replacing `latestVersion` with `v`. And `timestamp` is epoch milliseconds, not seconds, so a naive conversion lands you in 1970. The `ec` array lists the file extensions published alongside the main artifact, which is how you check whether sources and javadoc jars exist before trying to download them.
Quick facts
- Base URL
https://search.maven.org/solrsearch- Authentication
- No key or account. The same index powers the search box on search.maven.org.
- Rate limit
- Not published, but Sonatype throttles aggressive clients. Cache results and send a descriptive User-Agent.
- Pricing
- Free.
- CORS
- Not enabled — call it from your server
- Official docs
- Read the docs
How to use the Maven Central Search API
Every request below was executed against the live API on 21 Aug 2026, and the response shown is the real body it returned — not an illustration.
1. Find all artifacts in a group
GET https://search.maven.org/solrsearch/select?q=g:com.google.guava&rows=2&wt=json
curl 'https://search.maven.org/solrsearch/select?q=g:com.google.guava&rows=2&wt=json'const res = await fetch("https://search.maven.org/solrsearch/select?q=g:com.google.guava&rows=2&wt=json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://search.maven.org/solrsearch/select?q=g:com.google.guava&rows=2&wt=json", timeout=20)
res.raise_for_status()
print(res.json()){
"responseHeader": {
"status": 0,
"QTime": 1,
"params": {
"q": "g:com.google.guava",
"core": "",
"indent": "off",
"spellcheck": "true",
"fl": "id,g,a,latestVersion,p,ec,repositoryId,text,timestamp,versionCount",
"start": "",
"spellcheck.count": "5",
"sort": "score desc,timestamp desc,g asc,a asc",
"rows": "2",
"wt": "json",
"version": "2.2"
}
},
"response": {
"numFound": 21,
"start": 0,
"docs": [
{
"id": "com.google.guava:guava-gwt",
"g": "com.google.guava",
"a": "guava-gwt",
"latestVersion": "33.4.8-jre",
"repositoryId": "central",
"p": "jar",
"timestamp": 1744652208425,
"versionCount": 94,
"text": [
"com.google.guava",
"guava-gwt",
"-sources.jar",
".pom",
".jar"
],
"ec": [
"-sources.jar",
".pom",
".jar"
]
},
{
"id": "com.google.guava:guava-testlib",
"g": "com.google.guava",
"a": "guava-testlib",
"latestVersion": "33.4.8-jre",
"repositoryId": "central",
"p": "jar",
"timestamp": 1744651668186,
"versionCount": 145,
"text": [
"com.google.guava",
"guava-testlib",
"-sources.jar",
".pom",
"-test-sources.jar",
"-javadoc.jar",
"-tests.jar",
".jar"
],
"ec": [
"-sources.jar",
".pom",
"-test-sources.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Required | Solr query. Use field prefixes `g:`, `a:`, `v:`, `p:` and `c:`, combined with `AND` or `OR`. g:com.google.guava |
rows | integer | Optional | Results per page, default 10. Values in the low hundreds are accepted. 2 |
start | integer | Optional | Zero-based offset for paging through `numFound` results. 20 |
wt | string | Optional | Response writer. Use `json`; the default is XML. json |
core | string | Optional | Set to `gav` to return one row per version instead of one row per artifact. gav |
Response fields
responseHeader.paramsobject- Echo of every parameter Solr actually applied, including defaults you did not send. Invaluable when a query returns something unexpected.
response.numFoundinteger- Total matches, which is usually far larger than the rows returned. Page with `start` rather than raising `rows` indefinitely.
response.docs[].idstring- Coordinate string, `groupId:artifactId` in the default core and `groupId:artifactId:version` when `core=gav`.
response.docs[].g / astring- groupId and artifactId as separate fields, which is what you actually paste into a build file.
response.docs[].latestVersionstring- Newest published version. Absent when `core=gav`, where each row carries `v` instead.
response.docs[].timestampinteger- Publication time in epoch MILLISECONDS. Divide by 1000 before passing it to a seconds-based date function.
response.docs[].versionCountinteger- How many versions exist, a quick proxy for how actively maintained an artifact is.
response.docs[].ecarray of strings- Published file extensions such as `.jar`, `-sources.jar` and `-javadoc.jar`. Check here before assuming sources are available.
What you can build with the Maven Central Search API
- Check whether a dependency has a newer release before an upgrade
- Resolve a partial coordinate to full groupId and artifactId in a build tool
- Audit which of a project's dependencies publish sources and javadoc jars
- Build a dependency search feature into an internal developer portal
- Track how many versions of a library have shipped over time
Common errors and how to fix them
XML instead of JSON
`wt` defaults to XML.
Fix: Always send `wt=json` explicitly; the API does not honour an `Accept` header for this.
Zero results for a known artifact
Field prefixes are case-sensitive and groupIds must match exactly.
Fix: Try a bare keyword query first to confirm the artifact is indexed, then tighten it with `g:` and `a:`.
Dates in 1970
`timestamp` is milliseconds since the epoch.
Fix: Divide by 1000, or use a milliseconds-aware constructor, before formatting the date.
Maven Central Search API — frequently asked questions
Does the Maven Central search API need a key?
No. It is fully public and unauthenticated, and it is the same index the website search box uses.
How do I list every version of an artifact?
Add `core=gav` to your query. Each row then represents one version, exposed as `v`, rather than one artifact with a `latestVersion`.
Can I download jars through this API?
No. Search returns coordinates and metadata; the files live at `https://repo1.maven.org/maven2/` under a path derived from the groupId, artifactId and version.
Why does my query return unrelated artifacts?
A bare term is a fuzzy full-text search across the whole index. Use `g:` and `a:` prefixes for exact field matching.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
JSON Viewer
View JSON as a collapsible interactive tree online. Expand and collapse nodes, search keys and values, and copy the JSONPath of any node privately.
Timestamp Converter
Convert timestamps to human-readable dates and dates back to timestamps. Auto-detects seconds vs milliseconds, shows local, UTC and ISO 8601 formats.
JSON to CSV Converter
Convert a JSON array of objects to CSV online. Automatic column headers from the union of all keys, delimiter choice and proper quoting — all in-browser.
Alternatives to Maven Central Search API
If Maven Central Search does not fit, these developer & testing apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| GitHub REST API | GitHub REST API with no key for public data: repository details, users, issues, releases and commits. 60 req/hour unauthenticated, 5,000 with a token. | No key | Yes | 19 Aug 2026 |
| JSONPlaceholder | Free fake REST API for testing and prototyping. Posts, comments, users and todos with full GET, POST, PUT and DELETE support. No key. Real curl examples. | No key | Yes | 19 Aug 2026 |
| Postman Echo | Postman Echo reflects your HTTP request back as JSON: headers, body, query params and auth. Free, no key, ideal for debugging clients. Real POST example. | No key | No | 19 Aug 2026 |
| DummyJSON | Free fake REST API with realistic products, users, carts, recipes and auth. Supports search, pagination, sorting and POST. No key. Tested GET and POST examples. | No key | Yes | 19 Aug 2026 |
| Mermaid.ink | Turn Mermaid diagram source into a PNG, JPEG, SVG or PDF with a single URL. No key, no JavaScript, works in READMEs and email. Verified example included. | No key | Yes | 21 Aug 2026 |
| NetworkCalc | Calculate subnet masks, network and broadcast addresses and host ranges over HTTP, plus DNS lookups, with no API key. Verified example and full field breakdown. | No key | Yes | 21 Aug 2026 |
Maven Central Search is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 21 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.