Our DuckDuckGo Images API provides access to image search results from DuckDuckGo Images, including the original images, their sizes and sources, and the shopping ads shown above them. You can narrow your search by date, size, color, type, layout, and license, hide AI-generated images, and search in any DuckDuckGo region.


The API endpoint is https://serpapi.com/search?engine=duckduckgo_images

Head to the playground for a live and interactive demo.

API parameters

Search query

q

Required

Parameter defines the query you want to search. You can use anything that you would use in a regular DuckDuckGo Images search. (e.g., site:)

Parameter length can not exceed 500 characters.

Localization

kl

Optional

Parameter defines the region to use for the DuckDuckGo Images search. Region code examples: us-en (default) for the United States, uk-en for United Kingdom, or fr-fr for France. Head to the DuckDuckGo regions for a full list of supported regions.

Advanced filters

safe

Optional

Parameter defines the level of filtering for adult content. It can be set to 1 (Strict), -1 (Moderate - default), or -2 (Off).

df

Optional

Parameter defines results filtered by date. It can be set to:
d - Past day
w - Past week
m - Past month
y - Past year

size

Optional

Parameter defines results filtered by image size. It can be set to:
Small - Small
Medium - Medium
Large - Large
Wallpaper - Wallpaper

color

Optional

Parameter defines results filtered by image color. It can be set to:
color - Color only
Monochrome - Black and white
Red - Red
Orange - Orange
Yellow - Yellow
Green - Green
Blue - Blue
Purple - Purple
Pink - Pink
Brown - Brown
Black - Black
Gray - Gray
Teal - Teal
White - White

image_type

Optional

Parameter defines results filtered by image type. It can be set to:
photo - Photograph
clipart - Clipart
gif - Animated GIF
transparent - Transparent
line - Line drawing

layout

Optional

Parameter defines results filtered by image layout. It can be set to:
Square - Square
Tall - Tall
Wide - Wide

license

Optional

Parameter defines results filtered by image license. It can be set to:
Any - All Creative Commons
Public - Public domain
Share - Free to share and use
ShareCommercially - Free to share and use commercially
Modify - Free to modify, share, and use
ModifyCommercially - Free to modify, share, and use commercially

hide_ai_images

Optional

Parameter defines whether to hide AI-generated images, like DuckDuckGo's Hide AI images setting. It can be set to true or false (default).

Pagination

start

Optional

Parameter defines the result offset. It skips the given number of results. DuckDuckGo Images returns up to 100 images_results per page, so the next page starts at 100.

The next page can be found in the SerpApi JSON response: serpapi_pagination -> next

SerpApi parameters

engine

Required

Set parameter to duckduckgo_images to use the DuckDuckGo Images API engine.

no_cache

Optional

Parameter will force SerpApi to fetch the DuckDuckGo Images results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together.

async

Optional

Parameter defines the way you want to submit your search to SerpApi. It can be set to false (default) to open an HTTP connection and keep it open until you got your search results, or true to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.

zero_trace

Optional

Enterprise only. Parameter enables ZeroTrace mode. It can be set to false (default) or true. Enable this mode to skip storing search parameters, search files, and search metadata on our servers. This may make debugging more difficult.

api_key

Required

Parameter defines the SerpApi private key to use.

output

Optional

Parameter defines the format of the result. It can be set to json (default) to get a structured JSON of the results, html to get the raw HTML retrieved, or md to get a Markdown-formatted version optimized for LLMs and AI agents.

json_restrictor

Optional

Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.

API results

JSON results

JSON output includes structured data for images results, shopping results, suggested searches, and pagination.

A search status is accessible through search_metadata.status. It flows this way: Processing -> Success || Error. If a search has failed, error will contain an error message. search_metadata.id is the search ID inside SerpApi.

HTML results

This API does not have a full HTML response, only text. search_metadata.prettify_html_file contains a link to the prettified version of the result. It is displayed in the playground.

Markdown results

Markdown output is optimized for LLMs and AI agents. It provides a curated view of the JSON results in a token-efficient format using tables, markdown links, and YAML frontmatter.

To access, use the output=md parameter, the /search.md endpoint, or request header Accept: text/markdown.

API examples

Example with q: Coffee

Images are in the order DuckDuckGo shows them. original is the link to the full-size image, and link is the page the image is on. When there are no shopping ads, DuckDuckGo shows suggested_searches above the images instead.

Example with q: Coffee

JSON Example

{
  ...
  "suggested_searches": [
    {
      "name": "Drink Types",
      "query": "Coffee Drink Types",
      "link": "https://duckduckgo.com/?q=Coffee+Drink+Types&kl=us-en&iar=images&iax=images&ia=images",
      "serpapi_link": "https://serpapi.com/search.json?engine=duckduckgo_images&kl=us-en&q=Coffee+Drink+Types",
      "thumbnail": "https://tse2.mm.bing.net/th?q=Coffee+Drink+Types&r=0&pid=Api&mkt=en-US&cc=US&setlang=en&adlt=moderate&t=1"
    },
    ...
  ],
  "images_results": [
    {
      "title": "Beyond Caffeine: How the Coffee Experience Enhances Brain Readiness ...",
      "link": "https://neurosciencenews.com/coffee-readiness-caffeine-23543/",
      "source": "neurosciencenews.com",
      "original": "https://neurosciencenews.com/files/2023/06/coffee-brain-caffeine-neuroscincces.jpg",
      "original_width": 1200,
      "original_height": 800,
      "thumbnail": "https://tse2.mm.bing.net/th/id/OIP.zMFtlEEJqLUrX3QgDoG-qwHaE8?r=0&pid=Api",
      "format": "jpeg",
      "date": "2023-06-28T13:19:00Z"
    },
    {
      "title": "Best Organic Coffee In 2025 (Top 11 Picks)",
      "link": "https://www.fluentincoffee.com/best-organic-coffee/",
      "source": "fluentincoffee.com",
      "original": "https://fluentincoffee.com/wp-content/webp-express/webp-images/uploads/2022/10/how-to-make-coffee-with-whole-beans.png.webp",
      "original_width": 1200,
      "original_height": 628,
      "thumbnail": "https://tse3.mm.bing.net/th/id/OIP.2xFRYssB5Q9EF16WAuAiSAHaD4?r=0&pid=Api",
      "date": "2022-10-10T00:00:00Z"
    },
    ...
  ],
  "serpapi_pagination": {
    "current": "https://serpapi.com/search.json?engine=duckduckgo_images&kl=us-en&q=Coffee",
    "next": "https://serpapi.com/search.json?engine=duckduckgo_images&kl=us-en&q=Coffee&start=100"
  }
}

Example with q: office chair

For product searches, DuckDuckGo shows shopping ads above the images, and more of them between the images further down. They are in shopping_results, with block_position set to top or middle. The middle block often repeats ads from the top block. in_store and store_distance are set for products available in a store near the location of the search.

Example with q: office chair

JSON Example

{
  ...
  "shopping_results": [
    {
      "block_position": "top",
      "title": "Anagrace Leather Office Chair With Lumbar Support Upholstery Color: Camel Pebbled Faux Leather",
      "link": "https://www.allmodern.com/Wade-Logan%C2%AE--Anagrace-Leather-Office-Chair-with-Lumbar-Support-X221166491-L10-K~A110099545.html?refid=MX79439935901615-A110099545_1849757797&device=c&ptid=2331239529516653&targetid=pla-2331239529516653&network=s&PiID%5B%5D=1849757797&refid=MX590447120-A110099545_1849757797&device=c&ptid=2331239529516653&network=s&targetid=pla-2331239529516653&msclkid=d52e0c5eff9913ff758966b4d75064e5&utm_source=bing&utm_medium=cpc&utm_campaign=AM.P.US.B.High_BAU%20PPC%20-%20PMAX&utm_term=2331239529516653&utm_content=AM%20BAU%20PPC%20-%20Feed%20Only",
      "source": "AllModern",
      "price": "$200.00",
      "extracted_price": 200.0,
      "old_price": "$210.00",
      "extracted_old_price": 210.0,
      "rating": 4.5,
      "reviews": 579,
      "snippet": "This task chair combines a modern office silhouette with functional components for a productive setup in your space. The foam-padded back and seat are wrapped in faux leather upholstery, delivering consistent support through daily routines. An engineered wood frame sits on a multi-star base with built-in casters, making it easy to roll between workstations or tasks. It features an adjustable height lever and built-in lumbar support to accommodate individual posture configurations. Plus, the integrated tilt mechanism lets you shift positions seamlessly while maintaining a stable foundation. Dense foam fill delivers supportive cushioning across the seat and backrest panels. Equipped with double-wheel casters to handle movement across compatible hard floor types. Designed with center tilt functions for an adaptable reclining range during daily tasks. The fixed arm design creates a consistent upper body resting posture during work sessions. Brand Name: Wade Logan®. Upholstery Color: Camel Pebbled Faux Leather",
      "thumbnail": "https://www.bing.com/th?id=OPHS.b5d5z74Spktvig474C474&o=5&pid=21.1"
    },
    {
      "block_position": "top",
      "title": "Realspace Hurston Bonded Leather High-Back Executive Chair, Black, BIFMA Compliant",
      "link": "https://ad.doubleclick.net/searchads/link/click?lid=58700009017596701&ds_a_cid=405526310&ds_a_caid=23586531575&&ds_e_adid=73598915259733&ds_e_target_id=pla-2325398374544972&ds_e_product_group_id=2325398374544972&ds_e_product_id=219491&ds_e_product_country=US&ds_e_product_language=EN&ds_e_product_channel=Local&ds_e_network=s&ds_url_v=2&ds_dest_url=https://www.officedepot.com/a/products/219491/Realspace-Hurston-Bonded-Leather-High-Back/?utm_campaign=lia_cor_evg_seating_local_unid_prch_non-match_v3&mediacampaignid=23586531575&utm_source=bing&utm_medium=cpc&gclid=c916628126f21d57642d086b0e3bc30e&gclsrc=3p.ds&msclkid=c916628126f21d57642d086b0e3bc30e&utm_term=2325398374544972&utm_content=Seating",
      "source": "Office Depot",
      "price": "$169.99",
      "extracted_price": 169.99,
      "snippet": "Give your desk an inviting look with this Realspace Hurston executive chair. The sturdy wooden frame provides strength and stability, while the bonded leather material pairs style and easy maintenance. A tilt and lock mechanism and swivel function support reclining and versatile seating angles. This Realspace Hurston executive chair has padded arms to add comfort. Use the pneumatic seat-height adjustment lever to help elevate pressure points in legs. Contoured back, seat and padded armrest keeps you comfortable as you sit. Backed by the manufacturer's 5-year limited warranty. ANSI/BIFMA Compliant - This product has been tested and verified for compliance with rigorous performance requirements and safety standards related to specific furniture products. Meets/Exceeds Flammability Standard TB117-2013. | Realspace Hurston Bonded Leather High-Back Executive Chair, Black, BIFMA Compliant",
      "thumbnail": "https://www.bing.com/th?id=OPHS.VTQ4HMrVJjCnSw474C474&o=5&pid=21.1",
      "in_store": "In store",
      "store_distance": "3.4 mi"
    },
    ...
    {
      "block_position": "middle",
      "title": "HON Convergence Task Mesh Chair - Black - ULINE",
      "link": "https://8759.xg4ken.com/trk/v1?prof=402&camp=4094&kct=msn&kchid=1349&criteriaid=pla-4582008569628170&campaignid=698192356&locphy=104827&adgroupid=1254544088859179&cid=78409134211113&kdv=c&kext=&kpg=4582008569628170&kpid=H-7053&queryStr=office%20chair&url=https://www.uline.com/Product/Detail/H-7053/Office-Chairs/HON-Convergence-Task-Mesh-Chair-Black?pricode=WB6799&utm_source=Bing&utm_medium=pla&utm_term=H-7053&utm_campaign=Office%2BFurniture&utm_source=Bing&utm_medium=pla&utm_term=H-7053&utm_campaign=Office%2BFurniture&ad_group_id=1254544088859179&msclkid=d98d738e56cd1b45666f19647e0438b6",
      "source": "Uline",
      "price": "$415.00",
      "extracted_price": 415.0,
      "snippet": "HON Mesh Chairs - Dimensions: Overall: 23 3/4 - 26 1/2 x 24 1/2 - 26 1/2 x 35 1/2 - 40\" (W x D x H) Back: 18 x 19\" (W x H) Actual: Seat: 19 1/2 x 19 1/2\" Seat Height: 18 - 22 1/2\" Armrest Height: Lowest: 23 1/4\" Highest: 30.44\" Base (Diameter): 27\" Material: Back: ilira stretch mesh Seat: 100% Polyester Features: Adjustments: Seat height Adjustable lumbar support Upright tilt lock Standard tilt Tilt tension Armrest height/width Class 4 gas lift May be assembled without armrests. Assembly: Hardware included (3 Bolts, 3 Washers, Allen wrench) Armrests do not require hardware. Slide them into bracket to attach to chair. Personalize your comfort with this popular American brand. Long-lasting, 3\" thick molded foam seat with durable, stain-resistant fabric. Breathable mesh back with adjustable lumbar support. Padded armrests with push-button height adjustment.",
      "thumbnail": "https://www.bing.com/th?id=OPHS.NqHaarje2qGtHw474C474&o=5&pid=21.1"
    }
    ...
  ],
  ...
}

Example with df, size, color, image_type and layout

The filters narrow down the images like the filters above the results on DuckDuckGo Images. Here, they keep large, wide, mostly brown photos from the past month.

Example with df, size, color, image_type and layout

JSON Example

{
  ...
  "images_results": [
    {
      "title": "Freshly Roasted Coffee Beans & Ground Coffee | Imperial Teas - Page 2",
      "link": "https://imperialteas.co.uk/collections/coffee?page=2",
      "source": "imperialteas.co.uk",
      "original": "https://imperialteas.co.uk/cdn/shop/collections/Main_Coffee_header.png?v=1791885988&width=1400",
      "original_width": 1400,
      "original_height": 600,
      "thumbnail": "https://tse1.mm.bing.net/th?id=OIF.XFAlU4Tg%2bxNPOy6Tl4miag&r=0&pid=Api",
      "format": "jpeg"
    },
    {
      "title": "Freshly Roasted Coffee Beans & Ground Coffee | Imperial Teas - Page 2",
      "link": "https://imperialteas.co.uk/collections/coffee?page=2",
      "source": "imperialteas.co.uk",
      "original": "https://imperialteas.co.uk/cdn/shop/collections/Main_Coffee_header.png?v=1791885988&width=1200",
      "original_width": 1200,
      "original_height": 514,
      "thumbnail": "https://tse3.mm.bing.net/th?id=OIF.r44ztiQT6BS4rPVi%2f%2fubNg&r=0&pid=Api",
      "format": "jpeg"
    },
    ...
  ],
  ...
}

Example with start: 100

DuckDuckGo Images has no page numbers: it loads the next images while scrolling down, 100 at a time. start skips the images before it, like the next link in serpapi_pagination, which is there as long as DuckDuckGo has more images.

Example with start: 100

JSON Example

{
  ...
  "images_results": [
    {
      "title": "Close Up Roasted Coffee Beans With Dramatic Light And Copy Space Photo ...",
      "link": "https://pikbest.com/photo/close-up-roasted-coffee-beans-with-dramatic-light-and-copy-space_10859240.html",
      "source": "pikbest.com",
      "original": "https://img.pikbest.com/photo/20240919/close-up-roasted-coffee-beans-with-dramatic-light-and-copy-space_10859240.jpg!bw700",
      "original_width": 700,
      "original_height": 1053,
      "thumbnail": "https://tse2.explicit.bing.net/th/id/OIP.DEJf_DCgkj9jhAMj8pbKJwHaLJ?r=0&pid=Api",
      "format": "jpeg",
      "date": "2024-09-19T16:54:01Z"
    },
    ...
  ],
  "serpapi_pagination": {
    "current": "https://serpapi.com/search.json?engine=duckduckgo_images&kl=us-en&q=coffee&start=100",
    "next": "https://serpapi.com/search.json?engine=duckduckgo_images&kl=us-en&q=coffee&start=200"
  }
}

JSON structure overview

{
  ...
  "suggested_searches": [
    {
      "name": "String - Text of the suggestion, as displayed. (Ex. Cold Brew)",
      "query": "String - Query of the suggested search. (Ex. Cold Brew Coffee)",
      "link": "String - Link to the suggested search on DuckDuckGo Images.",
      "serpapi_link": "String - SerpApi link to the suggested search.",
      "thumbnail": "String - Link to the image of the suggestion."
    },
    ...
  ],
  "shopping_results": [
    {
      "block_position": "String - Where DuckDuckGo shows the product: top, above the images, or middle, between them.",
      "title": "String - Title of the product.",
      "link": "String - Link to the product in its store.",
      "source": "String - Name of the store selling the product.",
      "price": "String - Price of the product, as displayed. (Ex. $200.00)",
      "extracted_price": "Number - Price of the product.",
      "installment": {
        "price": "String - Monthly installment, which DuckDuckGo shows as the price. (Ex. $25.00/mo)",
        "extracted_price": "Number - Monthly installment.",
        "down_payment": "String - Down payment, which DuckDuckGo doesn't show. (Ex. $0.00)",
        "extracted_down_payment": "Number - Down payment."
      },
      "old_price": "String - Regular price of the product, as displayed, when it's on sale. (Ex. $210.00)",
      "extracted_old_price": "Number - Regular price of the product.",
      "rating": "Float - Average rating of the product, out of 5.",
      "reviews": "Integer - Number of reviews of the product.",
      "snippet": "String - Description of the product, which DuckDuckGo doesn't show.",
      "thumbnail": "String - Link to the image of the product.",
      "tag": "String - Label DuckDuckGo shows on the image of the product: its price drop, or else a short version of its special offer. (Ex. 25% off*)",
      "delivery": "String - Delivery information. (Ex. Free shipping)",
      "extensions": "Array - What buyers say about the product. (Ex. [\"easy to clean\", \"perfect fit\"])",
      "special_offer": "String - Special offer of the store. Its short version is in tag. (Ex. Buy 1, get 2nd 25% off with code FEEDERS25)",
      "special_offer_code": "String - How to redeem the special offer. (Ex. Use code at checkout: FEEDERS25)",
      "special_offer_expires_in_days": "Integer - Number of days before the special offer expires, at the time of the search. (Ex. 60)",
      "in_store": "String - Shown for products available in a store near the location of the search. (Ex. In store)",
      "store_distance": "String - Distance to that store. (Ex. 3.4 mi)"
    },
    ...
  ],
  "images_results": [
    {
      "title": "String - Title of the page the image is on.",
      "link": "String - Link to the page the image is on.",
      "source": "String - Domain of the page the image is on. (Ex. walmart.com)",
      "original": "String - Link to the full-size image.",
      "original_width": "Integer - Width of the full-size image, in pixels.",
      "original_height": "Integer - Height of the full-size image, in pixels.",
      "thumbnail": "String - Link to the thumbnail of the image.",
      "format": "String - Format of the image. (Ex. jpeg, png, webp)",
      "date": "String - Date DuckDuckGo found the image, in ISO 8601 format. (Ex. 2024-09-30T00:00:00Z)"
    },
    ...
  ],
  "serpapi_pagination": {
    "current": "String - SerpApi link to the current page.",
    "next": "String - SerpApi link to the next page."
  }
}