[GH-ISSUE #286] Ability to list models on ollama.com #62163

Open
opened 2026-05-03 07:43:24 -05:00 by GiteaMirror · 22 comments
Owner

Originally created by @jkleckner on GitHub (Aug 4, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/286

It would be nice to see what models are in the registry. For example, llama2:70b is in there but not in the README.md

Originally created by @jkleckner on GitHub (Aug 4, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/286 It would be nice to see what models are in the registry. For example, `llama2:70b` is in there but not in the README.md
GiteaMirror added the ollama.comfeature request labels 2026-05-03 07:43:24 -05:00
Author
Owner

@technovangelist commented on GitHub (Aug 5, 2023):

Yes, we are working on this. Soon there will be a site where you can see all this. We are still working on the right way to share this info.

<!-- gh-comment-id:1666380064 --> @technovangelist commented on GitHub (Aug 5, 2023): Yes, we are working on this. Soon there will be a site where you can see all this. We are still working on the right way to share this info.
Author
Owner

@t3r-cni commented on GitHub (Aug 23, 2023):

Is this https://ollama.ai/library? Issue closed?

<!-- gh-comment-id:1690493677 --> @t3r-cni commented on GitHub (Aug 23, 2023): Is this https://ollama.ai/library? Issue closed?
Author
Owner

@MassimilianoPasquini97 commented on GitHub (Aug 23, 2023):

@t3r-cni Would be nice to have a json version of library to fetch to, including model metadata such description, license and weight. Could be useful for third party developer and ollama cli with command like ollama search and ollama show for search and show detail of models.

<!-- gh-comment-id:1690501123 --> @MassimilianoPasquini97 commented on GitHub (Aug 23, 2023): @t3r-cni Would be nice to have a json version of library to fetch to, including model metadata such description, license and weight. Could be useful for third party developer and ollama cli with command like `ollama search` and `ollama show` for search and show detail of models.
Author
Owner

@t3r-cni commented on GitHub (Aug 23, 2023):

Thanks for the clarification. That would be nice.

<!-- gh-comment-id:1690503508 --> @t3r-cni commented on GitHub (Aug 23, 2023): Thanks for the clarification. That would be nice.
Author
Owner

@chrisweeksnz commented on GitHub (Aug 28, 2023):

Here are a couple of quick bash/zsh functions that should do what you want, until a better system is in place (like a json endpoint for library):

function ollama-get_latest_model_tags(){
  # Find available models
    echo "Gathering available models..."
    OLLAMA_MODELS=$(\
      curl -s https://ollama.ai/library | \
      grep 'class="group"' | \
      sed -e 's|.*library\/||' \
          -e 's|".*||' \
          -e 's|\/.*||' | \
      sort
      )

    # Finds tags of each model
    rm -f ${HOME}/.ollama_model_tag_library
    for MODEL in $(echo ${OLLAMA_MODELS})
    do 
      echo "Gathering available tags for ${MODEL}"
      curl -s https://ollama.ai/library/${MODEL}/tags | \
        grep "ollama pull" | \
        sed -e 's|^.*ollama pull ||' \
            -e 's|<.*||' \
        >> ${HOME}/.ollama_model_tag_library
    done
}

function ollama-print_latest_model_tags(){
  cat ${HOME}/.ollama_model_tag_library
}

# Usage:
#
# Call ollama_get_latest_model_tags when you want to update the list of models and tags
ollama_get_latest_model_tags
#
# Call ollama_print_latest_model_tags to see a list of all models and tags. Use grep to find the model you desire.
ollama_print_latest_model_tags
#
# Please note that this will leave a single artifact on your Mac, a text file: ${HOME}/.ollama_model_tag_library
# You can delete this at any time, it will get recreated when/if you run ollama_get_latest_model_tags

This will be prone to breaking if the structure/content of the HTML changes substantially, but works at the moment... enjoy!

<!-- gh-comment-id:1695602398 --> @chrisweeksnz commented on GitHub (Aug 28, 2023): Here are a couple of quick bash/zsh functions that should do what you want, until a better system is in place (like a json endpoint for library): ```bash function ollama-get_latest_model_tags(){ # Find available models echo "Gathering available models..." OLLAMA_MODELS=$(\ curl -s https://ollama.ai/library | \ grep 'class="group"' | \ sed -e 's|.*library\/||' \ -e 's|".*||' \ -e 's|\/.*||' | \ sort ) # Finds tags of each model rm -f ${HOME}/.ollama_model_tag_library for MODEL in $(echo ${OLLAMA_MODELS}) do echo "Gathering available tags for ${MODEL}" curl -s https://ollama.ai/library/${MODEL}/tags | \ grep "ollama pull" | \ sed -e 's|^.*ollama pull ||' \ -e 's|<.*||' \ >> ${HOME}/.ollama_model_tag_library done } function ollama-print_latest_model_tags(){ cat ${HOME}/.ollama_model_tag_library } # Usage: # # Call ollama_get_latest_model_tags when you want to update the list of models and tags ollama_get_latest_model_tags # # Call ollama_print_latest_model_tags to see a list of all models and tags. Use grep to find the model you desire. ollama_print_latest_model_tags # # Please note that this will leave a single artifact on your Mac, a text file: ${HOME}/.ollama_model_tag_library # You can delete this at any time, it will get recreated when/if you run ollama_get_latest_model_tags ``` This will be prone to breaking if the structure/content of the HTML changes substantially, but works at the moment... enjoy!
Author
Owner

@JDRay42 commented on GitHub (Oct 30, 2023):

In the CLI, when someone enters 'ollama pull' without a model name, it should return a current list of available models.

<!-- gh-comment-id:1785960671 --> @JDRay42 commented on GitHub (Oct 30, 2023): In the CLI, when someone enters 'ollama pull' without a model name, it should return a current list of available models.
Author
Owner

@sandros94 commented on GitHub (Nov 11, 2023):

In the CLI, when someone enters 'ollama pull' without a model name, it should return a current list of available models.

I second this.
I'm building a small chat interface as a personal exercise and I wanted to simplify this process too

<!-- gh-comment-id:1806638361 --> @sandros94 commented on GitHub (Nov 11, 2023): > In the CLI, when someone enters 'ollama pull' without a model name, it should return a current list of available models. I second this. I'm building a small chat interface as a personal exercise and I wanted to simplify this process too
Author
Owner

@omne-shree commented on GitHub (Dec 8, 2024):

Taken from #7751 with a few modification, this can be achieved using a justfile

set positional-arguments := true

default:
  just --list

#list Ollama models
@models:
    curl -s https://ollama.com/library | grep -oP 'href="/library/\K[^"]+'

#list model tags
@tags model:
    curl -s https://ollama.com/library/$1/tags | grep -oP "/library/$1:\K.*(?=\")"

example output:

$ just tags llama3.3
latest
70b
70b-instruct-fp16
70b-instruct-q2_K
70b-instruct-q3_K_M
70b-instruct-q3_K_S
70b-instruct-q4_0
70b-instruct-q4_1
70b-instruct-q4_K_M
70b-instruct-q4_K_S
70b-instruct-q5_0
70b-instruct-q5_1
70b-instruct-q5_K_M
70b-instruct-q6_K
70b-instruct-q8_0

to setup just, which is similar to make but intended as a command runner, more on installation here: just
just touch a justfile with contents above in the project root or home, the just command looks for a justfile in the current shell working directory

if using docker, possible to pull just in the ollama docker container with a justfile already setup

<!-- gh-comment-id:2526425780 --> @omne-shree commented on GitHub (Dec 8, 2024): Taken from #7751 with a few modification, this can be achieved using a justfile ``` set positional-arguments := true default: just --list #list Ollama models @models: curl -s https://ollama.com/library | grep -oP 'href="/library/\K[^"]+' #list model tags @tags model: curl -s https://ollama.com/library/$1/tags | grep -oP "/library/$1:\K.*(?=\")" ``` example output: ``` $ just tags llama3.3 latest 70b 70b-instruct-fp16 70b-instruct-q2_K 70b-instruct-q3_K_M 70b-instruct-q3_K_S 70b-instruct-q4_0 70b-instruct-q4_1 70b-instruct-q4_K_M 70b-instruct-q4_K_S 70b-instruct-q5_0 70b-instruct-q5_1 70b-instruct-q5_K_M 70b-instruct-q6_K 70b-instruct-q8_0 ``` to setup just, which is similar to make but intended as a command runner, more on installation here: [just](https://github.com/casey/just) just touch a **justfile** with contents above in the project root or home, the _just_ command looks for a justfile in the current shell working directory if using docker, possible to pull _just_ in the ollama docker container with a _justfile_ already setup
Author
Owner

@jmorganca commented on GitHub (Dec 23, 2024):

This is now possible on ollama.com

<!-- gh-comment-id:2558698627 --> @jmorganca commented on GitHub (Dec 23, 2024): This is now possible on [ollama.com](https://ollama.com)
Author
Owner

@edwinjhlee commented on GitHub (Jan 1, 2025):

This is now possible on ollama.com

I have searched the repo and didn't find the clue.

Is there some related documentation published ? Or perhaps an curl uasge example ?

Thank you ~

<!-- gh-comment-id:2566990171 --> @edwinjhlee commented on GitHub (Jan 1, 2025): > This is now possible on [ollama.com](https://ollama.com) I have searched the repo and didn't find the clue. Is there some related documentation published ? Or perhaps an curl uasge example ? Thank you ~
Author
Owner

@khimaros commented on GitHub (Jan 13, 2025):

i don't think this issue has been addressed for CLI

<!-- gh-comment-id:2586647670 --> @khimaros commented on GitHub (Jan 13, 2025): i don't think this issue has been addressed for CLI
Author
Owner

@edwinjhlee commented on GitHub (Jan 13, 2025):

i don't think this issue has been addressed for CLI

I am only looking for a solution in API form.

https://github.com/ollama/ollama/issues/1070

<!-- gh-comment-id:2586927507 --> @edwinjhlee commented on GitHub (Jan 13, 2025): > i don't think this issue has been addressed for CLI I am only looking for a solution in API form. https://github.com/ollama/ollama/issues/1070
Author
Owner

@mtribiere commented on GitHub (Jan 18, 2025):

I'm also looking for that API endpoint that would be really convenient.
Is there documentation about this somewhere?

<!-- gh-comment-id:2599908326 --> @mtribiere commented on GitHub (Jan 18, 2025): I'm also looking for that API endpoint that would be really convenient. Is there documentation about this somewhere?
Author
Owner

@craigahobbs commented on GitHub (Jan 20, 2025):

I, too, would like such a JSON API. It doesn't need to be live - it can be a static resource updated daily, making it inexpensive to host.

I've created such a resource for the ollama-chat model download page here:

models.json

The file format is available here:

models.json File Format

The models.json file is updated nightly from https://ollama.com/library. Ideally, the format would contain the quantization (Q), but that information isn't on the main page, and I wanted to keep my scraper simple.

The scraper approach works as a temporary measure, but it's fragile and not a long-term solution. An official Ollama API would be much better.

Is this what other people are thinking?

<!-- gh-comment-id:2603169722 --> @craigahobbs commented on GitHub (Jan 20, 2025): I, too, would like such a JSON API. It doesn't need to be live - it can be a static resource updated daily, making it inexpensive to host. I've created such a resource for the [ollama-chat](https://github.com/craigahobbs/ollama-chat) model download page here: [models.json](https://craigahobbs.github.io/ollama-chat/models/models.json) The file format is available here: [models.json File Format](https://craigahobbs.github.io/ollama-chat/api.html#var.vName='OllamaChatModels') The `models.json` file is updated nightly from https://ollama.com/library. Ideally, the format would contain the quantization (Q), but that information isn't on the main page, and I wanted to keep my scraper simple. The scraper approach works as a temporary measure, but it's fragile and not a long-term solution. An official Ollama API would be much better. Is this what other people are thinking?
Author
Owner

@Tickloop commented on GitHub (Mar 27, 2025):

Is ollama.com open sourced?

Its clear that web-scrapper based solutions can be built but a long term stable solution requires a JSON API. ollama.com seems to use Go+HTMX stack (best guess) which means a new endpoint will need to be created to support a JSON API.

Can the maintainers from ollama.com clarify if/how we can work on adding this functionality?
So either ollama.com will not support a JSON API for model registry or they do add an API upon which new cli commands may be built.

I have a search client written in python: https://github.com/Tickloop/silsila/blob/main/src/search_ollama.py
that I can port as a cobra command.

If ollama.com starts supporting a JSON API we can refactor later. This has gone too long without a solution 😞

<!-- gh-comment-id:2759144336 --> @Tickloop commented on GitHub (Mar 27, 2025): Is **ollama.com** open sourced? Its clear that web-scrapper based solutions can be built but a long term stable solution requires a JSON API. **ollama.com** seems to use Go+HTMX stack (best guess) which means a new endpoint will need to be created to support a JSON API. Can the maintainers from **ollama.com** clarify if/how we can work on adding this functionality? So either **ollama.com** will not support a JSON API for model registry or they do add an API upon which new cli commands may be built. I have a search client written in python: https://github.com/Tickloop/silsila/blob/main/src/search_ollama.py that I can port as a cobra command. If **ollama.com** starts supporting a JSON API we can refactor later. This has gone too long without a solution 😞
Author
Owner

@i-am-mike-davis commented on GitHub (Apr 15, 2025):

Is ollama.com open sourced?

Its clear that web-scrapper based solutions can be built but a long term stable solution requires a JSON API. ollama.com seems to use Go+HTMX stack (best guess) which means a new endpoint will need to be created to support a JSON API.

Can the maintainers from ollama.com clarify if/how we can work on adding this functionality? So either ollama.com will not support a JSON API for model registry or they do add an API upon which new cli commands may be built.

I have a search client written in python: https://github.com/Tickloop/silsila/blob/main/src/search_ollama.py that I can port as a cobra command.

If ollama.com starts supporting a JSON API we can refactor later. This has gone too long without a solution 😞

I am not an ollama.com maintainer, but I made ollama-admin-ui.

While the project is a webapp that implements the aforementioned web-scraping solution, it comes preloaded with the ollama model/tag library catalog and utility classes which can be imported into other tools and the catalog dumped to JSON without running the web application or conducting a scraping operation. More details in the project README.

<!-- gh-comment-id:2803827344 --> @i-am-mike-davis commented on GitHub (Apr 15, 2025): > Is **ollama.com** open sourced? > > Its clear that web-scrapper based solutions can be built but a long term stable solution requires a JSON API. **ollama.com** seems to use Go+HTMX stack (best guess) which means a new endpoint will need to be created to support a JSON API. > > Can the maintainers from **ollama.com** clarify if/how we can work on adding this functionality? So either **ollama.com** will not support a JSON API for model registry or they do add an API upon which new cli commands may be built. > > I have a search client written in python: https://github.com/Tickloop/silsila/blob/main/src/search_ollama.py that I can port as a cobra command. > > If **ollama.com** starts supporting a JSON API we can refactor later. This has gone too long without a solution 😞 I am not an **ollama.com** maintainer, but I made [ollama-admin-ui](https://github.com/i-am-mike-davis/ollama-admin-ui). While the project is a webapp that implements the aforementioned web-scraping solution, it comes preloaded with the ollama model/tag library catalog and utility classes which can be imported into other tools and the catalog dumped to JSON without running the web application or conducting a scraping operation. More details in the project README.
Author
Owner

@anirbanbasu commented on GitHub (Aug 21, 2025):

While intended for a different purpose, the project ollama-downloader, which I maintain, now has a list-models and list-tags capability. Both of these use web scraping.

<!-- gh-comment-id:3212452850 --> @anirbanbasu commented on GitHub (Aug 21, 2025): While intended for a different purpose, the project [ollama-downloader](https://github.com/anirbanbasu/ollama-downloader), which I maintain, now has a [`list-models`](https://github.com/anirbanbasu/ollama-downloader?tab=readme-ov-file#list-models) and [`list-tags`](https://github.com/anirbanbasu/ollama-downloader?tab=readme-ov-file#list-tags) capability. Both of these use web scraping.
Author
Owner

@ashupednekar commented on GitHub (Sep 6, 2025):

Hi, I understand it can be done by curling and grepping the API... but it would be useful to have an ollama browse command..

I'd be happy to take that up and raise a PR... if it aligns with the goals

<!-- gh-comment-id:3262928487 --> @ashupednekar commented on GitHub (Sep 6, 2025): Hi, I understand it can be done by curling and grepping the API... but it would be useful to have an `ollama browse` command.. I'd be happy to take that up and raise a PR... if it aligns with the goals
Author
Owner

@ashupednekar commented on GitHub (Sep 7, 2025):

is scraping the site really the only way? I get that it's SSR... aren't there any api's that can be used to list the models?

<!-- gh-comment-id:3263544893 --> @ashupednekar commented on GitHub (Sep 7, 2025): is scraping the site really the only way? I get that it's SSR... aren't there any api's that can be used to list the models?
Author
Owner

@Tickloop commented on GitHub (Sep 7, 2025):

For new folk discovering this issue:

PR Open for 5 months

https://github.com/ollama/ollama/pull/10046

No comment/feedback.

<!-- gh-comment-id:3263557368 --> @Tickloop commented on GitHub (Sep 7, 2025): For new folk discovering this issue: PR Open for 5 months https://github.com/ollama/ollama/pull/10046 No comment/feedback.
Author
Owner

@Dutcho commented on GitHub (Feb 3, 2026):

I expected the 'remote list' function. And now it's absent, I would very much appreciate if it gets added (incl. tags etc.).
Ideally, it would not be only CLI, but also Python SDK. But if the server exposes a JSON API, that's easily circumvented now and fixed later.

Re:

No comment/feedback.

there's progress since that was posted.

Quite recently, @reid-endeavor approved with 'lgtm'. However, the branch has conflicts to be resolved before merging.
Perhaps @Tickloop you could find the time to look into those conflicts, so this can be merged, and we all can happily use it?

<!-- gh-comment-id:3840434543 --> @Dutcho commented on GitHub (Feb 3, 2026): I expected the 'remote list' function. And now it's absent, I would very much appreciate if it gets added (incl. tags etc.). Ideally, it would not be *only* CLI, but also Python SDK. But if the server exposes a JSON API, that's easily circumvented now and fixed later. Re: > No comment/feedback. there's progress since that was posted. Quite recently, @reid-endeavor approved with 'lgtm'. However, the branch has conflicts to be resolved before merging. Perhaps @Tickloop you could find the time to look into those conflicts, so this ***can*** be merged, and we all can happily use it?
Author
Owner

@Tickloop commented on GitHub (Apr 17, 2026):

@Dutcho conflicts resolved. Good to merge. Still waiting on a review (been over a year)

<!-- gh-comment-id:4270959416 --> @Tickloop commented on GitHub (Apr 17, 2026): @Dutcho conflicts resolved. Good to merge. Still waiting on a review (been over a year)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#62163