# Ollama Library Models Scraper (`axiomworks/ollama-library-scraper`) Actor

Scrape the Ollama model library by keyword or capability: model name, description, capability tags, sizes, pull count, tag count and last update for each model. Filter by one or more capabilities (models must match all of them). Public library data, no login.

- **URL**: https://apify.com/axiomworks/ollama-library-scraper.md
- **Developed by:** [Axiom Works](https://apify.com/axiomworks) (community)
- **Categories:** AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Ollama Library Scraper

**Returns:** one row per Ollama model with name, description, capabilities, sizes, pulls, tagCount, updated and sourceUrl.
**Input:** `{"maxItems":20}`
**Best for:** local-LLM catalogues, tracking model popularity over time, finding models by capability or parameter size.

```json
{"name": "llama3.2", "capabilities": ["tools"], "sizes": ["1b", "3b"], "pulls": "85.4M", "tagCount": 63, "updated": "2 years ago", "sourceUrl": "https://ollama.com/library"}
```

### What does Ollama Library Scraper do?

This Ollama scraper provides an Ollama API workflow through Apify and collects structured data about the AI models listed in the public Ollama model library. You can list the whole library, whose model count changes over time, or run a keyword search such as "llama", "qwen" or "coder". Every model becomes one clean record that you can export as JSON, CSV, Excel or HTML, or read through the Apify API.

The Actor reads only public pages. It needs no login, no account and no API key. It is designed for people who want to track which open models exist, compare their sizes and capabilities, watch pull counts grow, or feed a model catalogue into a spreadsheet, a database or an AI agent.

Typical uses:

Build a catalogue of local LLMs with their parameter sizes and capability tags.

Monitor which models are popular by tracking pull counts over time.

Find every model that supports a given capability, for example vision or tool calling.

Detect new or recently updated models by checking the update date.

Give an AI agent a live list of models it can pull and run locally.

This tool is an independent scraper. It is not affiliated with, endorsed by or sponsored by Ollama.

### What data can you get?

Each record describes one model from the library. The table lists every field in the output.

| Field | Type | Description |
|---|---|---|
| `id` | string | Stable ID, the same as the model name |
| `name` | string | Model name as listed in the library, for example `llama3.1` |
| `url` | string | Library page of the model |
| `sourceUrl` | string | The page the record was scraped from (the library listing or the search page) |
| `description` | string | Short description shown in the listing |
| `capabilities` | array | Capability tags such as tools, vision, thinking, embedding, cloud |
| `sizes` | array | Parameter-size tags such as 8b, 70b, 405b |
| `pulls` | string | Pull count as the site shows it, for example 120M |
| `pullsNumeric` | number | The pull count converted to a number (approximate, because the site abbreviates it) |
| `tagCount` | number | Number of tags (variants) of the model |
| `updated` | string | Relative last-update text, for example "1 year ago" |
| `tags` | array | Only when `includeTags` is true: per-tag digest, download size, context window, input types and update age. |
| `updatedAt` | string | Exact last-update time in ISO 8601, UTC |

Search-page records include `pulls` and `pullsNumeric` from the download badge. They can have null `tagCount`, `updated` and `updatedAt` when those values are not present in the listing markup. Download badges are excluded from `capabilities`. Library records usually include them. A null value means unavailable, not zero; agents should check it before comparisons.

Some models have no capability tags, so `capabilities` is an empty list for them. A few models have no size tags either, in which case `sizes` is empty. Embedding models and cloud-hosted models are tagged accordingly in `capabilities`.

### How to use

1. Open the Actor in Apify Console and go to the Input tab.
2. Optionally type a keyword into **Search query**. Leave it empty to read the whole library.
3. Optionally pick one or more **Required capabilities**. Only models that carry all the chosen tags are kept.
4. Set **Max models** to limit the output. The Actor never outputs more records than this number.
5. Click Start. A run over the full library finishes after fetching the selected public pages.
6. Open the Output tab to view the table, or download the data in your preferred format.

You can also start the Actor from code, from a schedule, from an integration such as Make or Zapier, or through the MCP server described below.

#### How searching works

With an empty search query the Actor reads the full library listing. With a search query it reads the site's own search results page, so the ranking is the site's ranking. The site search page supplies its top-ranked matches. When more results are needed, or capability filters are supplied, the Actor also reads the library and adds models whose name, description or capability text contains every query word. The maxItems limit applies after filtering and sorting. Leave the query empty to browse the library without keyword matching.

If the search finds nothing, for example because the keyword is nonsense, the run finishes successfully with zero items and logs a warning and sets a final status suggesting a broader search, fewer capabilities or a lower minPulls. It does not output placeholder records.

#### Select a model watchlist

Use `modelNames` when you already know the models you want to monitor. It accepts a mixture of plain library identifiers and full public Ollama library URLs. For example, `{"modelNames":["llama3.2","https://ollama.com/library/qwen3:8b"],"maxItems":20}` selects the two parent model records. A tag suffix identifies a variant, but the dataset still contains one row per model, not one row per tag. Turn on `includeTags` to inspect the variants within the model's `tags` array.

Exact selection avoids the ambiguity of keyword search. Searching for llama may find several related names; selecting llama3.2 keeps only the matching library name. Repeated names or URLs do not create duplicate rows. A missing name is reported in the log, while other names in the watchlist can still produce records. The selection is checked against the public library listing, so community uploads outside that listing are not included.

The searchQuery, capability, parameter-size and minimum-pull filters still apply to a watchlist. When modelNames is supplied, site search is skipped and every searchQuery word must match the selected library model. If a selected model does not satisfy those filters, it will be omitted. The global maxItems limit applies across the entire watchlist. This makes the input useful for scheduled comparisons: keep the same list between runs and compare each stable id, approximate pullsNumeric and updatedAt in your own storage. The Actor does not retain a historical series or calculate changes between runs.

#### Capability filter

The capability filter is applied after the page is read. It uses the capability tags shown for each model. When you select several capabilities, a model must have all of them. For example, selecting `vision` and `tools` keeps only models that are tagged with both.

To shortlist smaller variants, use `{"parameterSizes":["1b","3b"],"sortBy":"pulls","maxItems":20}`. The filter keeps models with at least one matching parameter-size badge. It combines with keyword, exact-name, capability and minimum-pull filters; those other filters must also match. The complete `sizes` array remains in the output, so a model can include larger variants too. This selects parent models rather than individual tags. Use `includeTags` when you need the listed variants and their download sizes. Parameter count alone does not establish memory requirements or guarantee that a model will run on your hardware. Missing size badges cannot match this filter.

### Input

| Field | Type | Description |
|---|---|---|
| `parameterSizes` | array | Match any parameter-size badge, e.g. \["1b", "3b"]. Case insensitive; default \[] applies no size filter. |
| `modelNames` | array | Exact model names or library URLs. Tagged URLs select the parent model. Empty by default. |
| `searchQuery` | string | Keyword to search for, for example `llama`. Empty means the whole library. Search may be supplemented with matching library models. |
| `capabilities` | array | Allowed values: tools, vision, thinking, embedding, cloud. A model must carry all selected tags. |
| `maxItems` | integer | Maximum number of models to output, between 1 and 1000. Default 50. |
| `sortBy` | string | `default` (site order), `pulls` (most pulled first) or `updated` (most recently updated first). |
| `minPulls` | integer | Keep only models with at least this many pulls. 0 means no filter. |
| `includeTags` | boolean | Default false. When true, each model also gets a `tags` array with tag, digest, size, contextWindow, inputTypes and updated, read from the model's tags page. This adds one request per model. |
| `proxyConfiguration` | object | Apify Proxy settings. Default direct requests; block recovery attempts Apify Proxy when available. |

Example input:

```json
{
  "searchQuery": "llama",
  "capabilities": ["tools"],
  "maxItems": 20
}
```

Start with {"maxItems":20} to get library rows without tag requests. All filters combine; maxItems is one shared limit after filtering and sorting. An empty exact selection tells you to check modelNames spelling or URL, clear searchQuery, remove capability or size filters, or lower minPulls. An unknown capability has no matching models and returns zero results. Malformed URLs and invalid limits fail input validation with a clear message.

### Output

The Actor writes one dataset item per model. Here is a real item from a run:

```json
{
  "id": "llama3.2",
  "name": "llama3.2",
  "url": "https://ollama.com/library/llama3.2",
  "sourceUrl": "https://ollama.com/library",
  "description": "Meta's Llama 3.2 goes small with 1B and 3B models.",
  "capabilities": [
    "tools"
  ],
  "sizes": [
    "1b",
    "3b"
  ],
  "pulls": "85.4M",
  "pullsNumeric": 85400000,
  "tagCount": 63,
  "updated": "2 years ago",
  "updatedAt": "2024-09-25T21:09:00.000Z"
}
```

Records are unique by `id`. The default dataset view shows the most useful columns: name, description, capabilities, sizes, pulls, tag count, update text and the model URL.

### How much does it cost?

The Actor is charged per result: you pay for each model record that is saved to the dataset. Check the Pricing tab of the Actor page for the current rates. The standard library listing uses one page request. Enabling tag details adds a page request per selected model. You can keep the total spend predictable by setting **Max models**.

### Use with AI agents (MCP)

You can call this Actor from any MCP-compatible AI assistant through the Apify MCP server. Add the following configuration to your client:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?tools=axiomworks/ollama-library-scraper"
    }
  }
}
```

Example prompts:

> "List the Ollama models that support vision and show their sizes."

> "Which Ollama models matching 'qwen' have the most pulls?"

> "Get the 20 most recently updated Ollama models using sortBy updated and show their updatedAt values."

> "Find Ollama embedding models and give me their descriptions."

The agent sees the input fields of the Actor, so it knows it can pass a search query, capability filters and a maximum number of items.

### Integrations and API

You can run the Actor through the Apify API and read the results as soon as the run finishes.

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("axiomworks/ollama-library-scraper").call(
    run_input={"searchQuery": "llama", "maxItems": 20}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["name"], item["pulls"], item["sizes"])
```

#### JavaScript

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('axiomworks/ollama-library-scraper').call({
    capabilities: ['vision'],
    maxItems: 25,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((m) => process.stdout.write(`${m.name}\n`));
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/axiomworks~ollama-library-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchQuery": "llama", "maxItems": 20}'
```

You can also connect the dataset to Google Sheets, Slack, webhooks, Make, Zapier and other integrations available on the Apify platform, or schedule the Actor to run daily and compare pull counts between runs.

### FAQ

**Can I paste a model URL into searchQuery?**
Yes. Public library URLs are normalized to their model name; a tagged URL such as `/library/llama3.2:3b` searches for its parent model. For exact matching or several targets, use modelNames. Search URLs read their q parameter, including encoded text.

**Does one unavailable model fail my entire watchlist?**
No. Missing watchlist targets are logged, and usable models continue. Failed tag pages leave tags null while retaining the listing record. Persistent blocks produce a successful empty run with a status explaining the next step. Only malformed input fails validation.

**Do I need an account on the target site?**
No. The Actor reads only public pages and never logs in.

**How many models can I get?**
The Actor reads the public library in one page; its model count changes over time. Keyword searches start with site-ranked search results and can add matching library models. maxItems caps the final output, and filters may reduce the count.

**Why is `pullsNumeric` approximate?**
The site shows pull counts in an abbreviated form such as 120M or 3.5K. The Actor keeps that text in `pulls` and converts it to a number in `pullsNumeric`, which therefore has the same precision as the abbreviation.

**Why are `capabilities` or `sizes` empty for some models?**
Those lists mirror the tags shown on the listing. Models without such tags get an empty list.

**Does it get community models uploaded by users?**
No. It covers the official library listing and its search results, and each record points to a library page.

**What happens when the site changes its layout?**
The Actor parses the page by its structure, but a large redesign could break it. If you notice missing fields, please report it through the Issues tab so it can be fixed.

**What if I get blocked?**
Retries with backoff are built in. On a blocked response, the Actor retries through fresh Apify Proxy sessions. You can also set a proxy configuration in the input.

**Does it use AI enrichment?**
No. All values come directly from the page, with no third-party AI processor involved.

### Is it legal to scrape Ollama?

The Actor collects only publicly visible information that anyone can see without logging in, and it does not touch private data or accounts. The model names, descriptions and statistics are public facts about software. Still, laws differ between countries, and a website's terms of service may restrict automated access. You are responsible for using the data in line with the site's terms and with the laws that apply to you, including copyright and data protection rules. The Actor spaces public page requests at least one second apart and backs off after retryable errors. If you are unsure about your use case, get legal advice.

### Feedback

Found a bug, a missing field or have an idea for a new one? Open an issue from the Issues tab of the Actor page. Feedback with an example input and the expected output helps the most.

Search results are matched with the public library cards to include tagCount, updated and updatedAt when those cards are available. The sourceUrl identifies the library page for these matched records. If the library request fails, search records retain null values for metadata absent from search cards.

# Actor input Schema

## `searchQuery` (type: `string`):

Model keywords, e.g. "llama" or "coder", or an Ollama library/search URL. Default "" lists the public library. Search results are supplemented with library matches. With modelNames, skips site search and filters exact models by every keyword. No matches succeeds with zero rows; broaden keywords or remove filters.

## `capabilities` (type: `array`):

Required capability tags, e.g. \["vision", "tools"]. Accepts tools, vision, thinking, embedding, cloud; every selected tag must match. Default \[] applies no capability filter. Combines with searchQuery, modelNames, parameterSizes and minPulls; unknown tags return zero rows.

## `sortBy` (type: `string`):

Order models after filtering, e.g. "pulls". "default" keeps site order, "pulls" sorts approximate pullsNumeric descending, "updated" sorts updatedAt newest first with missing timestamps last. Default "default". maxItems is applied after sorting.

## `minPulls` (type: `integer`):

Minimum approximate pull count, e.g. 1000000. Accepts nonnegative integers; default 0 disables this filter. Uses pullsNumeric converted from abbreviated site counts. Combines with the other filters; lower this value if no models match.

## `includeTags` (type: `boolean`):

Fetch variant details, e.g. true adds tags to each model row. Default false skips tag pages. Adds one request per selected model at one request/second; keep maxItems small for quick runs. Failed tag fetches leave tags null and retain the model. Does not create separate variant rows.

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

Shared maximum model rows across the entire search or modelNames watchlist, e.g. 20. Accepts integers 1-1000, default 50. Applied after all filters and sorting. Fewer rows are saved if fewer models match or the run spending limit is reached. Default prefill {"maxItems":20} lists 20 library models without tag requests.

## `proxyConfiguration` (type: `object`):

Connection settings, e.g. {"useApifyProxy": false} for direct requests or {"useApifyProxy": true} for Apify Proxy. Default direct requests; persistent blocks trigger a proxy recovery attempt when available.

## `modelNames` (type: `array`):

Exact public library names or Ollama model URLs, e.g. \["llama3.2", "https://ollama.com/library/qwen3:8b"]. Default \[] uses normal listing/search. Tagged URLs select parent models; duplicates yield one row. Skips site search; searchQuery and all filters still apply. Missing names yield no row; check spelling or remove filters.

## `parameterSizes` (type: `array`):

Parameter-size badges, e.g. \["1b", "3b", "8b"]. Matches any listed size, ignoring case. Default \[] disables this filter. Combines with searchQuery, modelNames, capabilities and minPulls. Models without matching badges are excluded; the output sizes still includes every badge. This is parameter count, not download size.

## Actor input object example

```json
{
  "searchQuery": "",
  "capabilities": [],
  "sortBy": "default",
  "minPulls": 0,
  "includeTags": false,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "modelNames": [],
  "parameterSizes": []
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "searchQuery": "",
    "includeTags": false,
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": false
    },
    "modelNames": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("axiomworks/ollama-library-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 = {
    "searchQuery": "",
    "includeTags": False,
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": False },
    "modelNames": [],
}

# Run the Actor and wait for it to finish
run = client.actor("axiomworks/ollama-library-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 '{
  "searchQuery": "",
  "includeTags": false,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "modelNames": []
}' |
apify call axiomworks/ollama-library-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,axiomworks/ollama-library-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/sWievB81p8na2qXH1/builds/4CSfJqZLjQGRw2x8B/openapi.json
