[GH-ISSUE #1070] API for models on ollama.com #527

Closed
opened 2026-04-12 10:13:17 -05:00 by GiteaMirror · 12 comments
Owner

Originally created by @danemadsen on GitHub (Nov 10, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1070

Hi I was wondering if you could add a way to either search for, or get a list of models available to pull off ollama.ai.

Currently the https://ollama.ai/library endpoint serves model information as HTML, it would be better if it was served as JSON so it could be better integrated into software

Originally created by @danemadsen on GitHub (Nov 10, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1070 Hi I was wondering if you could add a way to either search for, or get a list of models available to pull off ollama.ai. Currently the https://ollama.ai/library endpoint serves model information as HTML, it would be better if it was served as JSON so it could be better integrated into software
GiteaMirror added the feature requestollama.com labels 2026-04-12 10:13:17 -05:00
Author
Owner

@kris-hansen commented on GitHub (Feb 22, 2024):

I have a PR up for this which was intended as exploratory/for discussion. After sending up the PR, I read the discussion on Discord related to this topic (wrong order, I know). It seems like the primary concern with listing the libraries from the CLI is that when the number of remote models grows it will become hard to handle. I can see some approaches to address this:

  • do nothing: similar to listing the files in a directory with a lot of files, let the user pipe to more or other CLI tools to deal with the volume of information
  • add pagination: it's a bit weird to have pagination for a CLI but certainly implementable; could be optional with a default enabled or optional with a default disabled.

I have been using this feature (--list-remote) on my fork and have found it quite useful when exploring/pulling new models, but obviously not a critical feature.

Ideally, having a JSON file server side with the same contents as https://ollama.ai/library would make this easier/more reliable - something like https://ollama.ai/library.json would be helpful.

Happy to discuss, refactor, update or close the issue - LMK

<!-- gh-comment-id:1960045112 --> @kris-hansen commented on GitHub (Feb 22, 2024): I have a [PR](https://github.com/ollama/ollama/pull/1732) up for this which was intended as exploratory/for discussion. After sending up the PR, I read the discussion on Discord related to this topic (wrong order, I know). It seems like the primary concern with listing the libraries from the CLI is that when the number of remote models grows it will become hard to handle. I can see some approaches to address this: - do nothing: similar to listing the files in a directory with a lot of files, let the user pipe to more or other CLI tools to deal with the volume of information - add pagination: it's a bit weird to have pagination for a CLI but certainly implementable; could be optional with a default enabled or optional with a default disabled. I have been using this feature (--list-remote) on my fork and have found it quite useful when exploring/pulling new models, but obviously not a critical feature. Ideally, having a JSON file server side with the same contents as `https://ollama.ai/library` would make this easier/more reliable - something like `https://ollama.ai/library.json` would be helpful. Happy to discuss, refactor, update or close the issue - LMK
Author
Owner

@adriens commented on GitHub (May 11, 2024):

You can get that kind of resources, see 💰 Unleash ollama potential w. data and LLM capabilities

You can get the fresh data in 🦙 ollama models library Kaggle dataset

<!-- gh-comment-id:2106023570 --> @adriens commented on GitHub (May 11, 2024): You can get that kind of resources, see [💰 Unleash ollama potential w. data and LLM capabilities ](https://dev.to/adriens/unleash-ollama-potential-w-data-and-llm-capabilities-3ghl) You can get the fresh data in [🦙 ollama models library Kaggle dataset](https://www.kaggle.com/datasets/adriensales/ollama-models)
Author
Owner

@Crustack commented on GitHub (May 29, 2024):

👍
Any progress on this @jmorganca ?
I think for most people a REST API would be the most benefitial, with pagination.
I guess since many models have a lot of tags, maybe you could separate that into another endpoint,
having a GET ollama.com/api/models?filter=xyz&sortBy={featured|popular|newest|}page=1&pageSize=10 and a GET ollama.com/api/models/{modelName}/tags (which returns the same infos as requesting the local /api/tags)

<!-- gh-comment-id:2137567516 --> @Crustack commented on GitHub (May 29, 2024): :+1: Any progress on this @jmorganca ? I think for most people a REST API would be the most benefitial, with pagination. I guess since many models have a lot of tags, maybe you could separate that into another endpoint, having a `GET ollama.com/api/models?filter=xyz&sortBy={featured|popular|newest|}page=1&pageSize=10` and a `GET ollama.com/api/models/{modelName}/tags` (which returns the same infos as requesting the local `/api/tags`)
Author
Owner

@angelozerr commented on GitHub (Sep 17, 2024):

We are interested too with this feature for our Quarkus Toolings https://marketplace.visualstudio.com/items?itemName=redhat.vscode-quarkus and https://github.com/redhat-developer/intellij-quarkus to show supported ollama model in completion.

Today we display only Ollama model which are installed:

image

<!-- gh-comment-id:2355659159 --> @angelozerr commented on GitHub (Sep 17, 2024): We are interested too with this feature for our Quarkus Toolings https://marketplace.visualstudio.com/items?itemName=redhat.vscode-quarkus and https://github.com/redhat-developer/intellij-quarkus to show supported ollama model in completion. Today we display only Ollama model which are installed: ![image](https://github.com/user-attachments/assets/ecf44319-11d1-41d5-ac73-7aeaab4c4e4e)
Author
Owner

@adriens commented on GitHub (Sep 19, 2024):

@angelozerr , you may get some suitable code from the following Kaggle notebook : 🦙 ollama models duckdb database

Hope this helps 🤞

<!-- gh-comment-id:2362265565 --> @adriens commented on GitHub (Sep 19, 2024): @angelozerr , you may get some suitable code from the following Kaggle notebook : [🦙 ollama models duckdb database](https://www.kaggle.com/code/adriensales/ollama-models-duckdb-database) Hope this helps :crossed_fingers:
Author
Owner

@angelozerr commented on GitHub (Sep 20, 2024):

Thanks @adriens . I have seen quickly your link and you convert html code from the http ollama library to JSON.

I would prefer getting directly JSON.

<!-- gh-comment-id:2362789009 --> @angelozerr commented on GitHub (Sep 20, 2024): Thanks @adriens . I have seen quickly your link and you convert html code from the http ollama library to JSON. I would prefer getting directly JSON.
Author
Owner

@adriens commented on GitHub (Sep 20, 2024):

Sure sure

<!-- gh-comment-id:2362830027 --> @adriens commented on GitHub (Sep 20, 2024): Sure sure
Author
Owner

@angelozerr commented on GitHub (Sep 20, 2024):

Sure sure

Anyway thanks for your suggestion. I would like just to avoid adding a new Java library like JSoup in our tooling just for ollama.

<!-- gh-comment-id:2362975785 --> @angelozerr commented on GitHub (Sep 20, 2024): > Sure sure Anyway thanks for your suggestion. I would like just to avoid adding a new Java library like JSoup in our tooling just for ollama.
Author
Owner

@webfarmer commented on GitHub (Oct 2, 2024):

https://github.com/webfarmer/ollama-get-models

<!-- gh-comment-id:2388236412 --> @webfarmer commented on GitHub (Oct 2, 2024): [https://github.com/webfarmer/ollama-get-models](https://github.com/webfarmer/ollama-get-models)
Author
Owner

@oppenheimer- commented on GitHub (Oct 18, 2024):

just discovered this repo

name, description and tags are available as JSON here: https://ollama-models.zwz.workers.dev/ API seems to be working and up to date per today; models are sorted by "featured"

https://github.com/ollama/ollama/issues/1473#issuecomment-2421521786

<!-- gh-comment-id:2421524888 --> @oppenheimer- commented on GitHub (Oct 18, 2024): > just discovered this [repo](https://github.com/akazwz/ollama-models) > > name, description and tags are available as JSON here: https://ollama-models.zwz.workers.dev/ API seems to be working and up to date per today; models are sorted by "featured" https://github.com/ollama/ollama/issues/1473#issuecomment-2421521786
Author
Owner

@jakobhuss commented on GitHub (Oct 25, 2024):

ollama_models.py

<!-- gh-comment-id:2437566778 --> @jakobhuss commented on GitHub (Oct 25, 2024): [ollama_models.py](https://gist.github.com/jakobhuss/54c27c28bb860fb7e1069bde85122ad2)
Author
Owner

@dhiltgen commented on GitHub (Nov 21, 2024):

Lets track this under #286

<!-- gh-comment-id:2491845939 --> @dhiltgen commented on GitHub (Nov 21, 2024): Lets track this under #286
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#527