| name | aside-image-search |
| description | Use when you need to search images |
| metadata | {"version":"0.1.0"} |
Image Search
Use the imageSearch global in the REPL tool. It fetches Google Images with the browser profile's cookies, parses result metadata from the returned HTML, and returns compact JSON. You do not need to manually inspect the DOM.
Quick Reference
const results = await imageSearch.search('max verstappen', { limit: 10 });
console.log(JSON.stringify(results, null, 2));
Methods
imageSearch.search(query: string, opts?: ImageSearchOptions): Promise<ImageSearchResult[]>
Search Google Images. Returned imageUrl points to the discovered original image when Google exposes it. thumbnailUrl points to Google's thumbnail cache. License hints from Google are not legal guarantees; verify before reuse.
Browse the Google Images page directly if the helper fails.
Types
interface ImageSearchOptions {
limit?: number;
safeSearch?: 'active' | 'off';
size?: 'large' | 'medium' | 'icon';
color?: 'black' | 'blue' | 'brown' | 'gray' | 'green' | 'orange' | 'pink' | 'purple' | 'red' | 'teal' | 'transparent' | 'white' | 'yellow';
type?: 'animated' | 'clipart' | 'lineart';
license?: 'creativeCommons' | 'commercial';
time?: 'day' | 'week' | 'month' | 'year';
}
interface ImageSearchResult {
title: string;
sourceName?: string;
pageUrl: string;
imageUrl?: string;
thumbnailUrl?: string;
width?: number;
height?: number;
dominantColor?: string;
licensable?: boolean;
}