Add the power of the Box AI API to your custom apps at Content Cloud Summit on May 15

Learn more and register!

Requesting extra fields

Guides Search Requesting extra fields
Edit this page

Requesting extra fields

By default, the search API returns the standard format of a File, Folder, or Web Link. Each of these resources supports additional fields that can be requested through the fields query parameter.

curl -i -X GET ",tags" \
    -H "Authorization: Bearer <ACCESS_TOKEN>"
long offsetValue = 0;
long limitValue = 10;

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

final List<String> fields = new ArrayList<String>();

PartialCollection<BoxItem.Info> searchResults = boxSearch.searchRange(offsetValue, limitValue, searchParams);
IEnumerable<string> fields = new List<string>() { "name", "tags"};
BoxCollection<BoxItem> results = await client.SearchManager
    .QueryAsync("sales", fields: fields);
Python"sales", metadata_filters=metadata_search_filters, fields=["name", "tags"])
        fields: "name,tags"
    .then(results => {
        // ...

For more details on these fields, please check out the full File, full Folder, and full Web Link resources.

When the fields parameter is used to query additional information about the items, only those fields and a few base fields (id, type, name, etc) are returned. Any fields that were originally in the response would now have to be requested explicitly.