{"id":37081828,"url":"https://github.com/catchzeng/bing_images","last_synced_at":"2026-01-14T09:58:11.198Z","repository":{"id":44614779,"uuid":"341480863","full_name":"CatchZeng/bing_images","owner":"CatchZeng","description":"Python library to fetch image urls based on keywords and download from Bing.com.","archived":false,"fork":false,"pushed_at":"2023-06-15T09:24:50.000Z","size":290,"stargazers_count":30,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-03T13:11:54.060Z","etag":null,"topics":["ai-image","bing","bing-image","bing-image-scrapping","bing-image-search-api","cnn-image-classification","data-collector","image-collector","image-downloader","image-scraper","multithread","multithread-download","multithreading","python-image-download","python-imagesearch"],"latest_commit_sha":null,"homepage":"","language":"Python","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/CatchZeng.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":"2021-02-23T08:23:53.000Z","updated_at":"2025-04-18T02:57:16.000Z","dependencies_parsed_at":"2022-09-26T18:10:48.108Z","dependency_job_id":null,"html_url":"https://github.com/CatchZeng/bing_images","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/CatchZeng/bing_images","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatchZeng%2Fbing_images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatchZeng%2Fbing_images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatchZeng%2Fbing_images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatchZeng%2Fbing_images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CatchZeng","download_url":"https://codeload.github.com/CatchZeng/bing_images/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatchZeng%2Fbing_images/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai-image","bing","bing-image","bing-image-scrapping","bing-image-search-api","cnn-image-classification","data-collector","image-collector","image-downloader","image-scraper","multithread","multithread-download","multithreading","python-image-download","python-imagesearch"],"created_at":"2026-01-14T09:58:10.584Z","updated_at":"2026-01-14T09:58:11.185Z","avatar_url":"https://github.com/CatchZeng.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bing_images\n\n[![Supported Versions](https://img.shields.io/pypi/pyversions/bing-images.svg)](https://pypi.org/project/bing-images)\n[![PyPI Latest Release](https://img.shields.io/pypi/v/bing-images.svg)](https://pypi.org/project/bing-images/)\n[![License](https://img.shields.io/pypi/l/bing-images.svg)](https://github.com/bing-images-dev/bing-images/blob/master/LICENSE)\n\nPython library to fetch image urls and download using **multithreading** from [Bing.com](https://bing.com/).\n\n## Features\n\n- [x] Support **file type** filters.\n- [x] Support [Bing.com](https://bing.com/) **filterui** filters.\n- [x] Support **extra query params**, such as `\u0026first=100\u0026tsc=ImageBasicHover` in `https://cn.bing.com/images/search?q=cat\u0026first=100\u0026tsc=ImageBasicHover`\n- [x] Download using **multithreading** and custom thread **pool size**.\n- [x] Support **purely** obtaining the image urls.\n\n## Requirements\n\n### Chromedriver\n\n- Install [Google Chrome Browser](https://www.google.com/chrome/).\n- Download `chromedriver` from [here](https://chromedriver.chromium.org/downloads).\n- Add `chromedriver` to PATH.\n\n## Installation\n\n```shell\npip install bing-images\n```\n\n## Usage\n\n### Fetch Image Urls\n\nfetch_image_urls.py\n\n```py\nfrom bing_images import bing\n\nurls = bing.fetch_image_urls(\"cat\", limit=10, file_type='png', filters='+filterui:aspect-square+filterui:color2-bw', extra_query_params='\u0026first=1')\nprint(\"{} images.\".format(len(urls)))\ncounter = 1\nfor url in urls:\n    print(\"{}: {}\".format(counter, url))\n    counter += 1\n```\n\nRun\n\n```\n❯ python fetch_image_urls.py\nCrawled 70 image urls.\n10 images.\n1: http://www.freeiconspng.com/uploads/cat-png-9.png\n2: http://pngimg.com/uploads/cat/cat_PNG1616.png\n3: https://pngimg.com/uploads/cat/cat_PNG1621.png\n4: https://pngimg.com/uploads/cat/cat_PNG50532.png\n5: http://pngimg.com/uploads/cat/cat_PNG50501.png\n6: http://www.pngmart.com/files/5/Black-Cat-PNG-Transparent.png\n7: https://pngimg.com/uploads/cat/cat_PNG1618.png\n8: http://pngimg.com/uploads/cat/cat_PNG1624.png\n9: http://assets.stickpng.com/thumbs/580b57fbd9996e24bc43bb8a.png\n10: https://www.freeiconspng.com/uploads/black-cat-png-4.png\n```\n\n\u003e **filters**: You can visit \u003chttps://cn.bing.com/images/search?q=cat\u003e to operate filters through the UI, and then observe the link changes.\n\n### Download using multithreading\n\ndownload.py\n\n```py\nfrom bing_images import bing\n\nbing.download_images(\"cat\",\n                      20,\n                      output_dir=\"/Users/catchzeng/Desktop/cat\",\n                      pool_size=10,\n                      file_type=\"png\",\n                      force_replace=True,\n                      extra_query_params='\u0026first=1')\n```\n\n\u003e - **output_dir**: the default output_dir is `os.path.join(os.getcwd(), \"bing-images\")`\n\u003e - **pool_size**: thread poll size\n\nRun\n\n```shell\n❯ python download.py\nSave path: /Users/catchzeng/Desktop/cat\nCrawled 70 image urls.\nDownloading images\n#1 http://pngimg.com/uploads/cat/cat_PNG50509.png Downloaded\n#2 https://pngimg.com/uploads/cat/cat_PNG50498.png Downloaded\n#3 http://pngimg.com/uploads/cat/cat_PNG106.png Downloaded\n#4 http://pluspng.com/img-png/png-cute-cat-ginger-cat-1280.png Downloaded\n#5 http://www.freepngimg.com/download/cat/22193-3-adorable-cat.png Downloaded\n#6 http://pngimg.com/uploads/cat/cat_PNG50440.png Downloaded\n#7 http://pngimg.com/uploads/cat/cat_PNG50514.png Downloaded\n#8 https://pngimg.com/uploads/cat/cat_PNG50482.png Downloaded\n#9 https://pngimg.com/uploads/cat/cat_PNG50480.png Downloaded\n#10 https://pngimg.com/uploads/cat/cat_PNG50479.png Downloaded\n#11 http://pngimg.com/uploads/cat/cat_PNG50442.png Downloaded\n#12 https://pngimg.com/uploads/cat/cat_PNG50447.png Downloaded\n#13 https://pngimg.com/uploads/cat/cat_PNG50512.png Downloaded\n#14 https://pngimg.com/uploads/cat/cat_PNG50456.png Downloaded\n#15 https://pngimg.com/uploads/cat/cat_PNG50465.png Downloaded\n#16 http://pngimg.com/uploads/cat/cat_PNG50529.png Downloaded\n#17 http://pngimg.com/uploads/cat/cat_PNG50433.png Downloaded\n#18 http://pngimg.com/uploads/cat/cat_PNG50434.png Downloaded\n#19 http://pngimg.com/uploads/cat/cat_PNG50416.png Downloaded\n#20 https://purepng.com/public/uploads/large/purepng.com-catanimalscat-981524673949tj5ns.png Downloaded\nRenaming images\nFinished renaming\nDone\nElapsed time: 20.32s\n```\n\n![](./images/cat.jpg)\n\n### Download images with **filterui** filters\n\ndownload-square-and-black-white.py\n\n```py\nfrom bing_images import bing\n\nbing.download_images(\"cat\",\n                      20,\n                      output_dir=\"/Users/catchzeng/Desktop/cat\",\n                      pool_size=20,\n                      file_type=\"png\",\n                      filters='+filterui:aspect-square+filterui:color2-bw',\n                      force_replace=True)\n```\n\n![](./images/cat-bw.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatchzeng%2Fbing_images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatchzeng%2Fbing_images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatchzeng%2Fbing_images/lists"}