{"id":19283770,"url":"https://github.com/commonkestrel/imagesearch","last_synced_at":"2026-06-19T00:32:13.194Z","repository":{"id":60604035,"uuid":"543929063","full_name":"commonkestrel/imagesearch","owner":"commonkestrel","description":"A Go package used for retrieving the URLs or downloading Google Images search results.","archived":false,"fork":false,"pushed_at":"2023-01-23T15:55:16.000Z","size":136,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-03T17:29:17.674Z","etag":null,"topics":["go","golang","google","google-image-search","google-images","image-search","images","package"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/commonkestrel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-01T07:13:00.000Z","updated_at":"2024-07-08T20:12:15.000Z","dependencies_parsed_at":"2023-02-13T00:30:32.519Z","dependency_job_id":null,"html_url":"https://github.com/commonkestrel/imagesearch","commit_stats":null,"previous_names":["jibble330/imagesearch","jibble330/google-images"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/commonkestrel/imagesearch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commonkestrel%2Fimagesearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commonkestrel%2Fimagesearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commonkestrel%2Fimagesearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commonkestrel%2Fimagesearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commonkestrel","download_url":"https://codeload.github.com/commonkestrel/imagesearch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commonkestrel%2Fimagesearch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34513020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","google","google-image-search","google-images","image-search","images","package"],"created_at":"2024-11-09T21:34:59.330Z","updated_at":"2026-06-19T00:32:13.168Z","avatar_url":"https://github.com/commonkestrel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/commonkestrel/imagesearch/master/misc/logo.png\" width=640p\u003e\n\n# imagesearch [![Go Reference](https://pkg.go.dev/badge/github.com/commonkestrel/imagesearch.svg)](https://pkg.go.dev/github.com/commonkestrel/imagesearch) [![Go Report Card](https://goreportcard.com/badge/github.com/commonkestrel/imagesearch)](https://goreportcard.com/report/github.com/commonkestrel/imagesearch) [![Release](https://img.shields.io/github/release/commonkestrel/imagesearch.svg?style=flat-square)](https://github.com/commonkestrel/imagesearch/releases)\u003c/div\u003e\nA package designed to search Google Images based on the input query and arguments. These images may be protected under copyright, and you shouldn't do anything punishable with them, like using them for commercial use. \n\n---\n# Arguments\n\nThere are 2 required parameters, along with a variety of different search arguments.\n| Argument | Type | Description |\n| --- | --- | --- |\n| **query:** | *string* | The keyword(s) to search for. |\n| **limit** | *int* | The amount of images to fetch. Cannot fetch more than 100. |  \n| **arguments:** | *string* | Optional search parameters are passed through here. |\n\n## Search Arguments\n\nThese are used by passing ```imagesearch.{argument}.{option}``` in the ```arguments``` parameter. Only one option from each argument can be passed or Google will load the images without any arguments except the query.\n\n| Argument | Options | Description |\n| --- | --- | --- |\n| **Color** | Red, Orange, Yellow, Green, Teal, Blue, Purple, Pink, White, Gray, Black, Brown | Filter images by the dominant color. |\n| **ColorType** | Color, Grayscale, Transparent | Filter images by the color type, full color, grayscale, or transparent. |\n| **License** | CreativeCommons, Other | Filter images by the usage license. |\n| **Type** | Face, Photo, Clipart, Lineart, Animated | Filters by the type of images to search for. \\**Not to be confused with search_format*\\* |\n| **Time** | PastDay, PastWeek, PastMonth, PastYear | Only finds images posted in the time specified. |\n**AspectRatio** | Tall, Square, Wide, Panoramic | Specifies the aspect ratio of the images. |\n**Format** | Jpg, Gif, Png, Bmp, Svg, Webp, Ico, Raw | Filters out images that are not a specified format. If you would like to download images as a specific format, use the download_format argument instead. |\n\n---\n\n## Examples\nThis showcases the different functions provided and what each input and output means.\n```go\npackage main\n\nimport (\n    \"github.com/commonkestrel/imagesearch\"\n)\n\nfunc main() {\n    // Searches for \"example\", filtering by the color redand returns a slice of all the resulting urls.\n    // imagesearch.Images works the same, instead returning Image types instead of string\n    urls, err := imagesearch.Urls(\"example\", 0, imagesearch.Color.Red) \n    if err != nil {\n        panic(err)\n    }\n    \n    // Downloads the first found image to the \"images\" directory with the file name\n    // \"example\" (The file extension is determined by mimetypes inside the function)\n    // If an image with the same name already exists in \"images\", it will be overwritten.\n    path, err := imagesearch.DownloadImage(urls[0], \"./images\", \"example\") \n    if err != nil {\n        panic(err)\n    }\n\n    // Searches for \"example\" and downloads the first 10 results into the \"images\" directory.\n    // Returns a slice of all the image's absolute paths.\n    // missing is the difference between the number of downloaded images and the limit.\n    // missing is usually only non-zero with limits closer to or above 100\n    paths, missing, err := imagesearch.Download(\"example\", 10, \"./images\")\n}\n```\n\n## Credits\nThis library is inspired by the Python library [google-images-download](https://www.github.com/joeclinton1/google-images-download) created by **[hardikvasa](https://www.github.com/hardikvasa)** and maintained by **[joeclinton1](https://www.github.com/joeclinton1)**, but ported to **Go** and with some quality of life improvements, such as being able to retrieve urls as well. Essentially, this package is a port of the Python library [GoogleImageScraper](https://www.github.com/commonkestrel/GoogleImageScraper) to **Go**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommonkestrel%2Fimagesearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommonkestrel%2Fimagesearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommonkestrel%2Fimagesearch/lists"}