Edit

Share via


Search for packages across your feeds

Azure DevOps Services

Finding the right package for your project can be time-consuming, especially when you're managing multiple feeds, versions, and dependencies. In this article, you learn how to use Azure DevOps Code Search to perform functional package searches across all your feeds to help you locate your packages based on functionality, versions, or type.

Prerequisites

Product Requirements
Azure DevOps - An Azure DevOps organization.
- An Azure DevOps project.
- An Azure Artifacts feed.

Search packages

Azure DevOps code search lets you search all feeds in your organization, regardless of the project you’re in.

  1. Sign in to your Azure DevOps organization and navigate to your project (https://dev.azure.com/{Your_Organization}/{Your_Project}).

  2. In the search bar, enter a term (for example, time) in the search box and press Enter. This returns any package with the term "time" in its name or description.

  3. Select the Package tab to view all search results. Use the Feeds, Views, or Type dropdown menus to filter results by feed, feed view, or package type (for example, NuGet).

    A screenshot displaying how to filter the package search results.

Note

The Views filter appears only when you select a single feed from the Feeds filter.

Search for packages using the REST API

The Azure DevOps REST API provides an endpoint that allows you to search for packages within a specific organization. The following example demonstrates how to construct the HTTP request and request body to search for the react-calendar npm package across all feeds in your organization. See Fetch package search results for more details.

Example:

POST https://almsearch.dev.azure.com/ORGANIZATION_NAME/_apis/search/packagesearchresults?api-version=7.1
{
  "$orderBy": null,
  "$top": 100,
  "$skip": 0,
  "searchText": "react-calendar",
  "filters": {
    "ProtocolType": "Npm"
  }
}

Search for packages in upstream sources

Azure Artifacts upstream sources enable developers to consume packages from different feeds and public registries such as NuGet.org. Using Azure Artifacts, you can search for various types of packages in your upstream sources.

  1. Sign in to your Azure DevOps collection, and then navigate to your project.

  2. Select Artifacts, and then select your feed from the dropdown menu.

  3. Select Search Upstream Sources in the upper-right corner of the page.

  4. Choose a Package type and then enter the exact name in the Package Name text box. The package name is case sensitive and must be an exact match.

  5. Select Search to view a list of available versions for the package you searched.

Note

Searching for packages in upstream sources from your feed is supported only in Azure DevOps services.

Next steps