Enterprise-wide search

Guides Search Enterprise-wide search
Edit this page

Enterprise-wide search

By default, a search is only performed against the content that the authenticated user has access to. In some cases, administrators might want to search against all content owned by all users. For this use-case the scope query parameter can be set to a value of enterprise_content.

curl -i -X GET "https://api.box.com/2.0/search?query=sales&scope=enterprise_content" \
    -H "Authorization: Bearer <ACCESS_TOKEN>"
long offsetValue = 0;
long limitValue = 10;

BoxSearch boxSearch = new BoxSearch(api);
BoxSearchParameters searchParams = new BoxSearchParameters();

PartialCollection<BoxItem.Info> searchResults = boxSearch.searchRange(offsetValue, limitValue, searchParams);
BoxCollection<BoxItem> results = await client.SearchManager
    .QueryAsync("sales", mdFilters: filters, scope: "enterprise_content");
client.search().query("sales", metadata_filters=metadata_search_filters, scope="enterprise_content")
        scope: "enterprise_content"
    .then(results => {
        // ...

The enterprise_content scope can be requested by an admin through our support channels. Once this scope has been enabled for a user, it will allow that user to query for content across the entire enterprise and not only the content that they have access to.