---
name: javadocs
description: Get Javadoc/Scaladoc and source for Java, Kotlin, and Scala libraries on Maven Central via javadocs.dev — resolve versions, list and read rendered API docs, and read library source. Use when you need API documentation or source for a Maven Central dependency (an import, a stack-trace class, or a build-file coordinate) without a local checkout.
metadata:
  author: James Ward
  homepage: https://www.javadocs.dev
---

# javadocs.dev

Browse Javadoc/Scaladoc and source for any artifact on Maven Central (Java,
Kotlin, Scala) — no local build, checkout, or jar extraction required.

There are three ways to use it:

- **MCP server (preferred for agents):** Streamable HTTP at `https://www.javadocs.dev/mcp`.
  Its tools resolve the latest version, list Javadoc/source entries, and read
  rendered API docs or raw source straight from the live Maven Central catalog.
- **REST API:** read-only GET+query endpoints under `https://www.javadocs.dev/api/`
  mirror the MCP operations and return JSON. Discover them via OpenAPI at
  `https://www.javadocs.dev/openapi.json` or SwaggerUI at
  `https://www.javadocs.dev/api/doc`.
- **HTTP / URLs:** every page also returns Markdown when requested with the
  `Accept: text/markdown` header.

## Onboarding

### Step 1: Resolve dependencies

Before looking anything up, determine the exact Maven Central coordinates
(groupId, artifactId, version) the project uses. Identify the build tool from
its build file and run its dependency listing — prefer the wrapper / launcher
script if one is present:

- **Maven** (`pom.xml`, wrapper `mvnw`): `./mvnw dependency:list`
- **Gradle** (`build.gradle` or `build.gradle.kts`, wrapper `gradlew`): `./gradlew dependencies`
- **sbt** (`build.sbt`, launcher `sbt`): `./sbt dependencyTree`

## Best practices

### Use the project's resolved versions

When querying javadocs.dev, pass the version resolved above. Only look up the
latest version if the dependency's version isn't known from the resolved set —
API docs and source differ between versions, so using the resolved version
avoids mismatches.

### Prefer the MCP server

If an MCP client is available, connect to `https://www.javadocs.dev/mcp` and use
its tools instead of scraping HTML; they return structured results.

## URL patterns (fallback)

- `/{groupId}` — list artifacts for a group
- `/{groupId}/{artifactId}` — list versions for an artifact
- `/{groupId}/{artifactId}/{version}` — list classes / symbols
- `/{groupId}/{artifactId}/{version}/{path}` — a specific symbol's Javadoc
- use `latest` as the version to resolve the newest release

Append the Markdown header to any of these to get Markdown instead of HTML:

```
curl -H "Accept: text/markdown" https://www.javadocs.dev/dev.zio/zio-schema_3/1.8.5/zio/schema/Schema.html
```
