GET
/
files
/
v3
/
files
/
search
Search files
curl --request GET \
  --url https://api.hubapi.com/files/v3/files/search \
  --header 'Authorization: Bearer <token>'
{
  "paging": {
    "next": {
      "link": "",
      "after": ""
    },
    "prev": {
      "before": "",
      "link": ""
    }
  },
  "results": [
    {
      "extension": "<string>",
      "access": "PUBLIC_INDEXABLE",
      "parentFolderId": "<string>",
      "sourceGroup": "<string>",
      "fileMd5": "<string>",
      "encoding": "<string>",
      "type": "<string>",
      "isUsableInContent": true,
      "url": "<string>",
      "expiresAt": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "archivedAt": "2023-11-07T05:31:56Z",
      "path": "<string>",
      "archived": true,
      "size": 123,
      "name": "<string>",
      "width": 123,
      "id": "<string>",
      "defaultHostingUrl": "<string>",
      "updatedAt": "2023-11-07T05:31:56Z",
      "height": 123
    }
  ]
}
Supported products
Requires one of the following products or higher.
Marketing HubMarketing HubFree
Sales HubSales HubFree
Service HubService HubFree
Content HubContent HubStarter

Required Scopes

This API requires one of the following scopes:
  • files.ui_hidden.read
  • files

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

properties
string[]

A list of file properties to return.

after
string

Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit.

before
string
limit
integer

Number of items to return. Default limit is 10, maximum limit is 100.

sort
string[]

Sort files by a given field.

ids
integer[]

Search by a list of file IDs.

idLte
integer
idGte
integer
createdAt
string<date-time>

Search files by time of creation.

createdAtLte
string<date-time>

Search files by less than or equal to time of creation. Can be used with createdAtGte to create a range.

createdAtGte
string<date-time>

Search files by greater than or equal to time of creation. Can be used with createdAtLte to create a range.

updatedAt
string<date-time>

Search files by time of latest updated.

updatedAtLte
string<date-time>

Search files by less than or equal to time of latest update. Can be used with updatedAtGte to create a range.

updatedAtGte
string<date-time>

Search files by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range.

name
string

Search for files containing the given name.

path
string

Search files by path.

parentFolderIds
integer[]

Search files within given folderId.

size
integer

Search files by exact file size in bytes.

sizeLte
integer

Search files by less than or equal to file size. Can be used with sizeGte to create a range.

sizeGte
integer

Search files by greater than or equal to file size. Can be used with sizeLte to create a range.

height
integer

Search files by height of image or video.

heightLte
integer

Search files by less than or equal to height of image or video. Can be used with heightGte to create a range.

heightGte
integer

Search files by greater than or equal to height of image or video. Can be used with heightLte to create a range.

width
integer

Search files by width of image or video.

widthLte
integer

Search files by less than or equal to width of image or video. Can be used with widthGte to create a range.

widthGte
integer

Search files by greater than or equal to width of image or video. Can be used with widthLte to create a range.

encoding
string

Search files by specified encoding.

type
string

Filter by provided file type.

extension
string

Search files by given extension.

url
string

Search by file URL.

isUsableInContent
boolean

If true, shows files that have been marked to be used in new content. If false, shows files that should not be used in new content.

allowsAnonymousAccess
boolean

Search files by access. If true, will show only public files. If false, will show only private files.

fileMd5
string

Search files by a specific md5 hash.

expiresAt
string<date-time>

Search files by exact expires time. Time must be epoch time in milliseconds.

expiresAtLte
string<date-time>

Search files by less than or equal to expires time. Can be used with expiresAtGte to create a range.

expiresAtGte
string<date-time>

Search files by greater than or equal to expires time. Can be used with expiresAtLte to create a range.

Response

200
application/json

successful operation

Collections of files