Interface SearchQuery

Represents the query options used for searching.

interface SearchQuery {
    byteSize?: string;
    excludedFiles?: string | string[];
    excludedTags?: string | string[];
    full?: boolean;
    gif?: boolean;
    height?: string;
    includedFiles?: string | string[];
    includedTags?: string | string[];
    isNsfw?: boolean;
    limit?: number;
    orderBy?: ImageOrder;
    orientation?: ImageOrientation;
    width?: string;
}

Properties

byteSize?: string

Filter images by byte size. Accepted operators: <=, >=, >, <, !=, =

excludedFiles?: string | string[]

Force the API to not list the specified file IDs or signatures.

excludedTags?: string | string[]

Force the API to return images without any of the provided tags.

full?: boolean

Returns the full result without any limit (admins only).

gif?: boolean

Force or prevent the API to return .gif files.

height?: string

Filter images by height (in pixels). Accepted operators: <=, >=, >, <, !=, =

includedFiles?: string | string[]

Force the API to provide only the specified file IDs or signatures.

includedTags?: string | string[]

Force the API to return images with at least all the provided tags.

isNsfw?: boolean

Force or exclude lewd files (only works if included_tags only contain versatile tags and no nsfw only tag). You can provide 'null' to make it random.

limit?: number

Return an array of the number provided. A value greater than 30 requires admin permissions. Default is 1.

orderBy?: ImageOrder

Ordering criteria for the images.

orientation?: ImageOrientation

Image orientation criteria.

width?: string

Filter images by width (in pixels). Accepted operators: <=, >=, >, <, !=, =