Perform a search and return matching resources including URLs for the requested preview sizes.

Variable Description Data type Default value
$search * The search string in the standard ResourceSpace format. string
$restypes A string of resource type IDs to include e.g. "1,2". Leave empty to return resources of all types. string ""
$order_by A string indicating results order. Valid options are relevance, popularity, rating, date, colour, country, title, file_path, resourceid, resouretype, titleandcountry, random, status. Leave empty for relevance ordering. string "relevance"
$archive The archive status of resources to return. 0=live assets (the default), 1=pending archive, 2=archived, 3=deleted, -1=pending review, -2 = pending submission. integer 0
$fetchrows Maximum number of rows to return. Use "-1" to return all rows. integer -1
$sort Sort order, "asc"=ascending, "desc"=descending (default). string "desc"
$recent_search_daylimit If performing a 'recent' special search, limit the results to resources created in the last n number of days. 'n'=resources from the last n days, '' = no limit (default). string ""
$getsizes Comma separated list of preview sizes e.g. "thm, scr"' will retrieve the thumbnail and screen sized previews, "" = don't return any preview URLs (default). string ""
$previewext Return preview files matching this file extension. e.g. "mp4", "jpg" (default). string "jpg"

Return values

The resource results in JSON format. The parameters returned will depend on system configuration.

"creation_date":"2016-08-09 14:00:05",
"file_modified":"2016-08-09 14:00:05",
"field12":"2016-08-09 12:59",
"field8":"Example Photo",