Skip to main content
GET
/
api
/
v1
/
ollama
/
search
curl --request GET \
  --url 'http://localhost:3000/api/v1/ollama/search?query=llama&order=popular&categories=tools' \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "models": [
    {
      "name": "llama2",
      "description": "Meta's Llama 2 model for general chat and text generation",
      "tags": ["chat", "7b", "13b", "70b"],
      "downloads": 5420000,
      "lastUpdated": "2024-01-10T15:30:00Z"
    },
    {
      "name": "llama2-uncensored",
      "description": "Uncensored version of Llama 2",
      "tags": ["chat", "uncensored"],
      "downloads": 890000,
      "lastUpdated": "2024-01-08T10:00:00Z"
    }
  ]
}

Query Parameters

query
string
default:""
Search query string
categories
array
Filter by model categories
order
string
default:"newest"
Sort order for results
  • newest - Sort by newest first
  • popular - Sort by popularity (downloads)

Response

success
boolean
Indicates if the search was successful
models
array
Array of model objects matching the search criteria
curl --request GET \
  --url 'http://localhost:3000/api/v1/ollama/search?query=llama&order=popular&categories=tools' \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "models": [
    {
      "name": "llama2",
      "description": "Meta's Llama 2 model for general chat and text generation",
      "tags": ["chat", "7b", "13b", "70b"],
      "downloads": 5420000,
      "lastUpdated": "2024-01-10T15:30:00Z"
    },
    {
      "name": "llama2-uncensored",
      "description": "Uncensored version of Llama 2",
      "tags": ["chat", "uncensored"],
      "downloads": 890000,
      "lastUpdated": "2024-01-08T10:00:00Z"
    }
  ]
}

Notes

  • Leave query empty to browse all models
  • Multiple categories can be specified to filter results
  • Results are paginated automatically by the Ollama registry