APIs / Apps and media / Maven Central
1 credit per call2 endpoints4 datapoints
Maven Central API
Maven Central API for Java and JVM artifact search by keyword, group ID or artifact ID, and every version of an artifact with publish dates as JSON.
{
"success": true,
"data": {
"group_id": "com.google.guava",
"artifact_id": "guava",
"latest_version": "33.8.0-jre",
"release_version": "33.8.0-jre",
"last_updated": "2026-11-02T18:07:48Z",
"total": 162,
"page": 1,
"has_more": true,
"count": 20,
"items": [
{
"version": "33.8.0-jre",
"published_at": "2026-11-02T18:06:39.000Z",
"packaging": "bundle",
"url": "https://central.sonatype.com/artifact/com.google.guava/guava/33.8.0-jre"
},
{
"version": "33.8.0-android",
"published_at": "2026-11-02T18:06:38.000Z",
"packaging": "bundle",
"url": "https://central.sonatype.com/artifact/com.google.guava/guava/33.8.0-android"
},
{
"version": "33.7.2-jre",
"published_at": "2026-09-29T14:47:28.000Z",
"packaging": "bundle",
"url": "https://central.sonatype.com/artifact/com.google.guava/guava/33.7.2-jre"
}
]
},
"meta": {
"request_id": "req_2c4b014515b74e28b9c385639470f325",
"credits_charged": 1,
"credits_remaining": 490
}
}Sample data
What one call returns
A recorded run of versions: the fields and shapes you will get, shortened to 3 items.
| # | versionstring | published_atstring | packagingstring | urlurl |
|---|---|---|---|---|
| 1 | 33.8.0-jre | 2026-11-02T18:06:39.000Z | bundle | https://central.sonatype.com/artifact/com.google.guava/guava/33.8.0-jre |
| 2 | 33.8.0-android | 2026-11-02T18:06:38.000Z | bundle | https://central.sonatype.com/artifact/com.google.guava/guava/33.8.0-android |
| 3 | 33.7.2-jre | 2026-09-29T14:47:28.000Z | bundle | https://central.sonatype.com/artifact/com.google.guava/guava/33.7.2-jre |
[
{
"version": "33.8.0-jre",
"published_at": "2026-11-02T18:06:39.000Z",
"packaging": "bundle",
"url": "https://central.sonatype.com/artifact/com.google.guava/guava/33.8.0-jre"
},
{
"version": "33.8.0-android",
"published_at": "2026-11-02T18:06:38.000Z",
"packaging": "bundle",
"url": "https://central.sonatype.com/artifact/com.google.guava/guava/33.8.0-android"
},
{
"version": "33.7.2-jre",
"published_at": "2026-09-29T14:47:28.000Z",
"packaging": "bundle",
"url": "https://central.sonatype.com/artifact/com.google.guava/guava/33.7.2-jre"
}
]version,published_at,packaging,url 33.8.0-jre,2026-11-02T18:06:39.000Z,bundle,https://central.sonatype.com/artifact/com.google.guava/guava/33.8.0-jre 33.8.0-android,2026-11-02T18:06:38.000Z,bundle,https://central.sonatype.com/artifact/com.google.guava/guava/33.8.0-android 33.7.2-jre,2026-09-29T14:47:28.000Z,bundle,https://central.sonatype.com/artifact/com.google.guava/guava/33.7.2-jre
Recorded from our API · 3 items shown · 4 datapoints per itemGET /v1/maven-central/versions?group_id=com.google.guava&artifact_id=guava
4 datapoints
Contact
- urlurl
Other
- versionstring
- published_atstring
- packagingstring
Playground
Run this API
curl "https://api.perceptlayer.com/v1/maven-central/versions?group_id=com.google.guava&artifact_id=guava" \
-H "X-API-Key: $API_KEY"Maven Central · 2 endpoints
Endpoints
Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.
| Endpoint | Required parameters | Returns | Cost |
|---|---|---|---|
GET/v1/maven-central/search | none+5 optional | group_idartifact_idcoordinateslatest_versionpackagingupdated_at+1 more | 1 credit |
GET/v1/maven-central/versions | group_idartifact_id+2 optional | group_idartifact_idlatest_versionrelease_versionlast_updateditems | 1 credit |
Overview
About the Maven Central API
What you can get
The Maven Central API returns Java and JVM artifact data from Maven Central as JSON through 2 endpoints.
- Search:
searchtakes aquery(words in the group or artifact ID), agroup_idor anartifact_id, withpageandper_page(1 to 100, default 20). Search reaches the first 1,000 results. - Versions:
versionstakes agroup_idand anartifact_id, withpageandper_page(1 to 50, default 20). Versions come newest first.
The recorded search for group com.google.guava found 21 artifacts (total), each with group_id, artifact_id, coordinates (group:artifact), latest_version, packaging, updated_at and url. The recorded versions call for com.google.guava:guava found 162 versions, with latest_version and release_version both 33.8.0-jre and last_updated, and each version with version, published_at, packaging and url.
How a call works
Find the coordinates, then list versions: GET /v1/maven-central/search?group_id=com.google.guava&per_page=10 with your key in the X-API-Key header returns each artifact's group_id and artifact_id, which versions takes, for example GET /v1/maven-central/versions?group_id=com.google.guava&artifact_id=guava&per_page=10. Check has_more before asking for the next page. An artifact with no versions on Maven Central answers 404. Answers come from a cache for up to an hour. Every successful call costs 1 credit; failed calls cost nothing.
More apps and media APIs
Use cases
Let a coding agent look up the current release of a library before writing a `pom.xml` or `build.gradle`
Use the Maven Central API to let a coding agent look up the current release of a library before writing a `pom.xml` or `build.gradle`Flag outdated dependencies by comparing a build file against `release_version`
Use the Maven Central API to flag outdated dependencies by comparing a build file against `release_version`List every artifact a group publishes, such as all `com.google.guava` modules
Use the Maven Central API to list every artifact a group publishes, such as all `com.google.guava` modulesTrack release cadence from each version's `published_at`
Use the Maven Central API to track release cadence from each version's `published_at`FAQ
Questions
Is this the official Maven Central API?
No. Perceptlayer is an independent service and is not affiliated with Sonatype or Maven Central. Maven Central's search and repository are free to call directly, under Sonatype's terms, which forbid excessive requests. This API calls them on your behalf and adds one key for every source on Perceptlayer, one response shape for search and version lists, a cache of up to an hour, and no charge for failed calls.
Where do the version lists come from?
From the artifact's `maven-metadata.xml` in the Maven Central repository, so `versions` lists the versions the repository itself records for the artifact.
Can I search with several words?
Yes. Words are matched together against group and artifact IDs, up to 10 words. Use `group_id` or `artifact_id` for an exact match.
Does it return dependencies or POM details?
No. These endpoints return coordinates, versions, packaging and dates, not the dependency tree from a POM.
Should I build a Maven Central scraper instead?
You can, but a Maven Central scraper is code you maintain: page changes break it, requests get blocked, and Maven Central's terms govern how you collect data. The Maven Central API gives you 2 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.
Try the Maven Central API with 100 free credits
No credit card. Failed calls are never billed.