# Clojars Scraper – Clojure & JVM Package Metadata and Versions (`ninhothedev/clojars-scraper`) Actor

$0.5/1K 🔥 Clojars scraper! Clojure/JVM libraries — versions, downloads & dependency coordinates. No key. JSON, CSV, Excel or API in seconds. Discover & audit Clojure deps ⚡

- **URL**: https://apify.com/ninhothedev/clojars-scraper.md
- **Developed by:** [ninhothedev](https://apify.com/ninhothedev) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Clojars Clojure Package Scraper

**Scrape [Clojars](https://clojars.org) — the community package repository for Clojure and the JVM — without an API key, without login, without proxies.**

Search the whole Clojars index by keyword, or look up exact `group/name` coordinates, and get back clean, structured JSON: latest version, total downloads, description, license, homepage, source repo, dependencies, full version history and a ready-to-paste Leiningen dependency vector.

***

### What this Actor does

Clojars hosts tens of thousands of Clojure, ClojureScript and JVM libraries — Ring, Compojure, Reitit, Cheshire, http-kit, Datomic clients, Luminus modules and everything the Clojure ecosystem is built on. There is no bulk export and the web UI is paginated 24 results at a time.

This Actor turns Clojars into a dataset:

- **Search mode** — give it keywords (`ring`, `http`, `json`, `graphql`) and it pages through the Clojars search index, deduplicates hits by coordinate, then enriches **every** result with its full artifact detail.
- **Artifacts mode** — give it exact coordinates (`ring/ring-core`, `metosin/reitit`) and it resolves them directly, skipping search entirely.

One dataset item = one library. Every field is nullable, so partial data never breaks your pipeline.

### Use cases

- **Clojure dependency research** — compare candidate libraries by download count, release recency and license before you commit to a dependency.
- **Package discovery** — find every Clojars library matching a keyword, ranked and enriched, in one run.
- **Open-source intelligence** — track adoption of JVM/Clojure libraries over time, map maintainers to projects, monitor which packages are alive and which are abandoned.
- **Developer tooling** — power internal dependency dashboards, SBOM enrichment, license-compliance checks, or a Clojure package search box of your own.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | select | `search` | `search` (keyword queries) or `artifacts` (exact coordinates). |
| `queries` | array | `["ring", "http"]` | Keywords to search. Used in `search` mode. |
| `artifacts` | array | — | Coordinates like `ring/ring-core`. Used in `artifacts` mode. Full Clojars URLs and Leiningen vectors are accepted. |
| `maxItems` | integer | `100` | Hard cap on dataset items (max `1000`). |

```json
{
  "mode": "search",
  "queries": ["ring", "http"],
  "maxItems": 100
}
```

```json
{
  "mode": "artifacts",
  "artifacts": ["ring/ring-core", "metosin/reitit", "cheshire/cheshire"],
  "maxItems": 50
}
```

### Output

```json
{
  "group": "ring",
  "name": "ring-core",
  "coordinate": "ring/ring-core",
  "latest_version": "1.15.5",
  "latest_release": "1.15.5",
  "description": "Ring core libraries.",
  "homepage": "https://github.com/ring-clojure/ring",
  "user": "weavejester",
  "downloads": 40094991,
  "recent_downloads": null,
  "version_count": 130,
  "versions": ["1.15.5", "1.15.4", "1.15.3"],
  "licenses": ["The MIT License"],
  "scm_url": "https://github.com/ring-clojure/ring",
  "dependencies": ["[org.clojure/clojure \"1.9.0\"]"],
  "created": "2020-04-16T17:50:27.907000Z",
  "dependency_coordinate": "[ring/ring-core \"1.15.5\"]",
  "url": "https://clojars.org/ring/ring-core",
  "source": "clojars",
  "scraped_at": "2026-07-28T10:00:00Z"
}
```

#### Field notes

- `versions` is capped at the 30 most recent releases; `version_count` always reports the true total returned by Clojars.
- `description` is capped at 2000 characters.
- `dependency_coordinate` is a Leiningen vector you can paste straight into `project.clj`.
- `recent_downloads` is exposed for completeness but Clojars currently omits it on most artifacts, so it is usually `null`.
- `created` is only available for libraries discovered through search mode (Clojars returns it on search hits, not on artifact details).

### Pricing

Runs on 512 MB and hits a fast public JSON API — roughly **$0.5 per 1,000 libraries** in platform compute, plus your Apify plan's usage. A 100-library default run costs a few cents.

### Notes and limitations

- Clojars only hosts community-published artifacts. Libraries mirrored from Maven Central (for example `org.clojure/clojure` itself) return 404 on the Clojars artifact API and are skipped with a warning — use a Maven Central scraper for those.
- The Actor uses no proxy by default. Clojars is a friendly, public, unauthenticated API.
- Requests are retried three times with exponential backoff, and the HTTP layer falls back from `curl_cffi` to stdlib `urllib` if needed.

### Related Actors

- [Maven Central Scraper](https://apify.com/ninhothedev/maven-central-scraper)
- [Hex.pm Scraper](https://apify.com/ninhothedev/hex-pm-scraper)
- [Hackage Scraper](https://apify.com/ninhothedev/hackage-scraper)
- [MetaCPAN Scraper](https://apify.com/ninhothedev/metacpan-scraper)

### Local development

```bash
pip install -r requirements.txt
python -m src.main
python tests/test_smoke.py   # offline smoke tests
```

# Actor input Schema

## `mode` (type: `string`):

How to find libraries. 'search' runs keyword queries against the Clojars search index and enriches every hit with its full artifact detail. 'artifacts' skips search and resolves the exact group/name coordinates you list below.

## `queries` (type: `array`):

Keywords to search on Clojars, used only when mode is 'search'. One query per line, e.g. 'ring', 'http', 'json', 'datomic'. Results from all queries are merged and deduplicated by coordinate.

## `artifacts` (type: `array`):

Clojars coordinates to scrape directly, used only when mode is 'artifacts'. Format 'group/name', e.g. 'ring/ring-core' or 'metosin/reitit'. Full Clojars URLs and Leiningen vectors like \[ring/ring-core "1.15.5"] are accepted too.

## `maxItems` (type: `integer`):

Hard cap on the number of libraries pushed to the dataset. Keeps runs cheap and predictable. Minimum 1, maximum 1000.

## Actor input object example

```json
{
  "mode": "search",
  "queries": [
    "ring",
    "http"
  ],
  "artifacts": [
    "ring/ring-core",
    "metosin/reitit"
  ],
  "maxItems": 100
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "ring",
        "http"
    ],
    "artifacts": [
        "ring/ring-core",
        "metosin/reitit"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/clojars-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "queries": [
        "ring",
        "http",
    ],
    "artifacts": [
        "ring/ring-core",
        "metosin/reitit",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/clojars-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "ring",
    "http"
  ],
  "artifacts": [
    "ring/ring-core",
    "metosin/reitit"
  ]
}' |
apify call ninhothedev/clojars-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ninhothedev/clojars-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/y8I1bWK4gZo0txIqD/builds/z363lU63oDXbUHiaX/openapi.json
