[GH-ISSUE #9142] [FEATURE] Add a /api/search Endpoint for Model Discovery #5947

Closed
opened 2026-04-12 17:17:34 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @Hamed-kshiem on GitHub (Feb 15, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9142

Description
Currently, users must manually browse the Ollama Library to find available models before running:

ollama run <MODEL>
ollama pull <MODEL>

There is no API endpoint to search for models directly, making automation and integration difficult.

Proposed Solution
Extend the local API to include a /api/search endpoint that allows querying models programmatically.

  • New API Endpoint: GET /api/search?q=<query>
  • Functionality: Returns a list of models matching the search query.
  • Response Format: JSON with model details (e.g., name, description, last updated).

Benefits

Improves CLI usability by enabling in-app model discovery.
Supports automation and integration with external tools.
Reduces the need for manual website lookups.

Would love to hear thoughts on this! 🚀

Originally created by @Hamed-kshiem on GitHub (Feb 15, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9142 **Description** Currently, users must manually browse the [Ollama Library](https://ollama.ai/library) to find available models before running: ``` ollama run <MODEL> ollama pull <MODEL> ``` There is no API endpoint to search for models directly, making automation and integration difficult. **Proposed Solution** Extend the local API to include a `/api/search` endpoint that allows querying models programmatically. - New API Endpoint: `GET /api/search?q=<query>` - Functionality: Returns a list of models matching the search query. - Response Format: JSON with model details (e.g., name, description, last updated). **Benefits** ✅ Improves CLI usability by enabling in-app model discovery. ✅ Supports automation and integration with external tools. ✅ Reduces the need for manual website lookups. Would love to hear thoughts on this! 🚀
GiteaMirror added the feature request label 2026-04-12 17:17:34 -05:00
Author
Owner

@rick-github commented on GitHub (Feb 15, 2025):

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

<!-- gh-comment-id:2661031222 --> @rick-github commented on GitHub (Feb 15, 2025): https://github.com/ollama/ollama/issues/2387
Author
Owner

@Hamed-kshiem commented on GitHub (Feb 15, 2025):

Hey @rick-github , post #2387 is for the CLI, while this suggestion is for the API endpoint.

<!-- gh-comment-id:2661033132 --> @Hamed-kshiem commented on GitHub (Feb 15, 2025): Hey @rick-github , post #2387 is for the CLI, while this suggestion is for the API endpoint.
Author
Owner

@rick-github commented on GitHub (Feb 15, 2025):

The CLI is a wrapper for the API.

<!-- gh-comment-id:2661033856 --> @rick-github commented on GitHub (Feb 15, 2025): The CLI is a wrapper for the API.
Author
Owner

@Hamed-kshiem commented on GitHub (Feb 15, 2025):

Thanks @rick-github, I didn't know that request will be closed.

<!-- gh-comment-id:2661034410 --> @Hamed-kshiem commented on GitHub (Feb 15, 2025): Thanks @rick-github, I didn't know that request will be closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#5947