lib/Imgur/Api/Gallery.php
public function search($query, $sort = 'time', $page = 0)
    {
        $this->validateSortArgument($sort, ['viral', 'top', 'time']);

        return $this->get('gallery/search/' . $sort . '/' . (int) $page, ['q' => $query]);
    }
public function search($query, $sort = 'time', $page = 0)
    {
        $this->validateSortArgument($sort, ['viral', 'top', 'time']);

        return $this->get('gallery/search/' . $sort . '/' . (int) $page, ['q' => $query]);
    }
public function search ( $ query , $ sort = 'time' , $ page = 0 ) { $ this -> validateSortArgument ( $ sort , [ 'viral' , 'top' , 'time' ] ) ; return $ this -> get ( 'gallery/search/' . $ sort . '/' . ( int ) $ page , [ 'q' => $ query ] ) ; }
Search the gallery with a given query string.

@param string $query Query string (note: if advanced search parameters are set, this query string is ignored).
This parameter also supports boolean operators (AND, OR, NOT) and indices (tag: user: title: ext: subreddit: album: meme:).
An example compound query would be 'title: cats AND dogs ext: gif'
@param string $sort  (time | viral | top)
@param int    $page

@see https://api.imgur.com/endpoints/gallery#gallery-search

@return array Gallery Image (@see https://api.imgur.com/models/gallery_image) OR Gallery Album (@see https://api.imgur.com/models/gallery_album)
Search the gallery with a given query string .