DuckDuckGo Images API Documentation

GET   /api/v1/search?engine=duckduckgo_images

DuckDuckGo Images API allows you to retrieve image search results from DuckDuckGo. Each result includes the image title, source website, original image link with dimensions, and a thumbnail URL. It supports locale-based targeting, date filtering, and image-specific filters like size, color, type, layout, and license.

API Parameters

Search Query

  • Name
    q
    Required
    Required
    Description

    This parameter is used for the terms you want to search on DuckDuckGo Images.

Localization

  • Name
    locale
    Required
    Optional
    Description

    Specifies the country and language for your search. The default parameter is us-en. Check the full list of supported DuckDuckGo locales.

Filters

  • Name
    time_period
    Required
    Optional
    Description

    Filters results by date. Available values are:

    • any_time Default
    • past_year
    • past_month
    • past_week
    • past_day

  • Name
    size
    Required
    Optional
    Description

    Filters images by size. Available values are:

    • small
    • medium
    • large
    • wallpaper

  • Name
    color
    Required
    Optional
    Description

    Filters images by color. Available values are:

    • color
    • monochrome
    • red
    • orange
    • yellow
    • green
    • blue
    • purple
    • pink
    • brown
    • black
    • gray
    • teal
    • white

  • Name
    image_type
    Required
    Optional
    Description

    Filters images by type. Available values are:

    • photo
    • clipart
    • gif
    • transparent
    • line

  • Name
    layout
    Required
    Optional
    Description

    Filters images by layout. Available values are:

    • square
    • tall
    • wide

  • Name
    license
    Required
    Optional
    Description

    Filters images by license. Available values are:

    • any
    • public
    • share
    • share_commercially
    • modify
    • modify_commercially

Pagination

  • Name
    next_page_token
    Required
    Optional
    Description

    This parameter is used to retrieve the next page of results. It is returned in the response when there are more results to display.

Engine

  • Name
    engine
    Required
    Required
    Description

    Parameter defines an engine that will be used to retrieve real-time data. It must be set to duckduckgo_images.

Api Key

  • Name
    api_key
    Required
    Required
    Description

    The api_key authenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).

Zero Data Retention

  • Name
    zero_retention
    Enterprise Only
    Enterprise Only
    Required
    Optional
    Description

    Set this parameter to true to disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.

API Examples

Images

Images
GET
https://www.searchapi.io/api/v1/search?engine=duckduckgo_images&q=cats
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "duckduckgo_images",
  "q": "cats"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "images": [
    {
      "position": 1,
      "title": "17 Cute Longhaired Cat Breeds | Cats with Long Hair",
      "source": {
        "name": "Bing",
        "link": "https://www.rd.com/list/long-haired-cat-breeds/"
      },
      "original": {
        "link": "https://www.rd.com/wp-content/uploads/2023/05/GettyImages-1341465008.jpg",
        "height": 1414,
        "width": 2121
      },
      "thumbnail": "https://tse3.mm.bing.net/th/id/OIP.YFmJZ1hmnsbXTGc7zCaiPgHaE8?pid=Api"
    },
    {
      "position": 2,
      "title": "Top 20 Most Popular Cat Breeds - Forbes Advisor",
      "source": {
        "name": "Bing",
        "link": "https://www.forbes.com/advisor/pet-insurance/pet-care/popular-cat-breeds/"
      },
      "original": {
        "link": "https://thumbor.forbes.com/thumbor/fit-in/900x510/https://www.forbes.com/advisor/wp-content/uploads/2023/09/getty_creative.jpeg.jpg",
        "height": 507,
        "width": 900
      },
      "thumbnail": "https://tse3.mm.bing.net/th/id/OIP.MNW1ABA7J4r-lA_hGE_soAEsCp?pid=Api"
    },
    {
      "position": 3,
      "title": "Getting to Know Different Cat Breeds - PETSFIT",
      "source": {
        "name": "Bing",
        "link": "https://petsfit.com/nl/blogs/news/getting-to-know-different-cat-breeds"
      },
      "original": {
        "link": "https://petsfit.com/cdn/shop/articles/Pictures_of_many_different_types_of_cats_ce3ccd7e-d66e-4ce7-bfc0-7b1052c96701_1200x1200.jpg?v=1719976116",
        "height": 473,
        "width": 900
      },
      "thumbnail": "https://tse2.mm.bing.net/th/id/OIP.sDIjnhbSMo8wW8pXgl538QHaD5?pid=Api"
    }
  ],
  "pagination": {
    "next_page_token": "aHR0cHM6Ly9kdWNrZHVja2dvLmNvbS9pLmpzP3E9Y2F0cyZvPWpzb24mcD0xJnM9MTAwJnU9YmluZyZsPXVzLWVuJnZxZD00LTI2MzEyNTUxODg5NTI4MDEzODkxMjU1NjA3NzU5NjQ2OTY0MzcxNw"
  }
}