To search for items, make a GET request to this URL:


GET /v2/search[?querystring] HTTP/1.1
Accept: application/xhtml+xml
Authorization: username:password

Optional Querystring Parameters

type: type of item to search for.
Valid values: video, playlist, event
Default: video

terms: a comma- or space- (encoded as “%20%” or “+”) delimited list of search terms.
Default: none (all items are returned)
Example: terms=bike+popsicle

fields: a comma-delimited list of fields to search.
Valid values: title, tags, summary, description.
Default: none (all fields are searched)
Example: fields=tags,title

playlists: a comma-delimited list of playlist keys limiting the search. Ignored if type is not video.
Default: none (all videos are searched)
Example: playlists=8b0b938cb14b12a7847f35d283142fe2273b9630

deleted: if present, returns deleted items.
Default: false (deleted items are not returned)
Example: deleted=true

activeonly: if present and set to false, overrides default that only returns items currently live. Note: this parameter only works for video asset searches.
Valid values: true, false
Default: true
Example: activeonly=false

limit: maximum number of items to return.
Default: 25
Example: limit=10

skip: number of records to skip when returning results. Useful for pagination.
Default: 0
Example: skip=10

timezone: the timezone of the start and end parameters; timestamps in results are also converted to this timezone.
Valid values: one of
Default: UTC
Example: America/Chicago

start: beginning of date range limiting search.
Valid values: any valid PHP date format without spaces; see
Default: today
Example: 2019-10-17

modifiedStart: beginning of date range limiting search by asset modified date.
Valid values: any valid PHP date format without spaces; see
Default: none
Example: 2019-10-17

end: end of date range limiting search.
Valid values: see start parameter
Default: none

modifiedEnd: end of date range limiting search by asset modified date.
Valid values: see modifiedStart parameter
Default: none

sorting: sort order of the returned items; items are listed by date (ordered newest to oldest), relevance (ordered based on likelihood that the item is what the user is looking for), or last modified (ordered by most recently updated).
Valid values: date, relevance, modified
Default: date
Example: sorting=relevance

q: allows acceptance of a string that is passed to search directly. Follow the Associated Press’s syntax guide to construct queries using the valid values below. Other parameters, like “terms” & “fields”, are ignored if q is set. 

Valid values: title, tags (must say tags not keywords), description, summary, captions
Default: none
Example: tag:fire+category:news

Items from accounts that are associated with the logged-in user are returned. In the case that no items matched the search criteria, an empty node (videos, playlists, or events) is returned. Note: playlists node is only returned if the query included the playlists parameter.

Video response

HTTP/1.1 200 OK
<?xml version="1.0"?>
            <key><![CDATA[FILE KEY]]></key>
            <url><![CDATA[VIDEO URL]]></url>
            <adaptive_stream><![ADAPTIVE URL]]></url>
            <thumb><![CDATA[FULL-SIZE IMAGE URL]]></thumb>
            <thumb><![CDATA[SMALL IMAGE URL]]></thumbSmall>
            <thumb><![CDATA[MEDIUM IMAGE URL]]></thumbMedium>
            <playlist><![CDATA[Playlist Key]]></playlist>
            <createDate><![CDATA[2019-10-14 23:38:06]]></createDate>
<lastModifiedDate><![CDATA[2019-10-14 23:38:06]]></lastModifiedDate>
<liveDate><![CDATA[2019-10-14 23:38:06]]></liveDate> <owner><![CDATA[Account]]></owner> <user><![CDATA[User]]></user> <id><![CDATA[525c805e3a228dd822b2363d]]></id> </video> <video>...<video> </videos>

Playlist response

HTTP/1.1 200 OK
<?xml version="1.0"?>
            <key><![CDATA[FILE KEY]]></key>
            <title><![CDATA[Smart Playlist]]></title>
            <thumb><![CDATA[IMAGE URL]]></thumb>
            <createDate><![CDATA[2019-10-14 23:10:19]]></createDate>

Live Event response

HTTP/1.1 200 OK
<?xml version="1.0"?>
             <key><![CDATA[FILE KEY]]></key>
             <title><![CDATA[Event title]]></title>
             <stream><![CDATA[STREAM NAME]]></stream>
             <startDate><![CDATA[2019-10-07 21:00]]></startDate>
             <endDate><![CDATA[2019-10-07 22:00]]></endDate>
             <summary><![CDATA[Summary text]]></summary>
             <createDate><![CDATA[2019-10-03 16:32:35]]></createDate>

Code Example

In PHP using curl to make the request:

      $url = '';
      $ch = curl_init($url);
      curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
      curl_setopt($ch, CURLOPT_USERPWD, 'usernamehere:passwordhere');
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      $content = curl_exec($ch);
      com.dotmarketing.util.ServletResponseCharacterEncoding@59941c23 = curl_getinfo($ch);
} catch (Exception $e) {
Share This