{"id":40046887,"url":"https://github.com/ivankliuk/duckduckpy","last_synced_at":"2026-01-19T05:36:26.205Z","repository":{"id":29217742,"uuid":"32749376","full_name":"ivankliuk/duckduckpy","owner":"ivankliuk","description":"DuckDuckGo search engine API library for Python","archived":false,"fork":false,"pushed_at":"2020-03-19T07:55:22.000Z","size":36,"stargazers_count":41,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-30T15:02:19.849Z","etag":null,"topics":["duckduckgo","python"],"latest_commit_sha":null,"homepage":null,"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/ivankliuk.png","metadata":{"files":{"readme":"README.rst","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":"2015-03-23T17:59:36.000Z","updated_at":"2025-05-26T00:41:10.000Z","dependencies_parsed_at":"2022-07-24T16:17:10.312Z","dependency_job_id":null,"html_url":"https://github.com/ivankliuk/duckduckpy","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ivankliuk/duckduckpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivankliuk%2Fduckduckpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivankliuk%2Fduckduckpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivankliuk%2Fduckduckpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivankliuk%2Fduckduckpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivankliuk","download_url":"https://codeload.github.com/ivankliuk/duckduckpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivankliuk%2Fduckduckpy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28561894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"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":["duckduckgo","python"],"created_at":"2026-01-19T05:36:26.144Z","updated_at":"2026-01-19T05:36:26.196Z","avatar_url":"https://github.com/ivankliuk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"DuckDuckPy\n==========\n\n|package| |travis-ci| |coveralls|\n\n`DuckDuckPy \u003chttps://github.com/ivankliuk/duckduckpy\u003e`_ is a Python\nlibrary for querying `DuckDuckGo API \u003chttps://api.duckduckgo.com/api\u003e`_ and\nrender results either to Python dictionary or namedtuple.\n\nFeatures\n--------\n\n* Uses standard library only\n* Works on Python 2.6+ and 3.3+\n* Unit test coverage 100%\n* SSL and unicode support\n* Licensed under MIT license\n\nInstallation\n------------\n\nYou can install DuckDuckPy either via the `Python Package Index (PyPI) \u003chttp://pypi.python.org/pypi\u003e`_ or\nfrom source.\n\nTo install using ``pip``:\n\n.. code:: bash\n\n    $ pip install duckduckpy\n\nTo install using ``easy_install``:\n\n.. code:: bash\n\n    $ easy_install duckduckpy\n\nTo install from sources you can download the latest version of DuckDuckPy\neither from `PyPI \u003chttp://pypi.python.org/pypi/duckduckpy/0.2\u003e`_ or\n`GitHub \u003chttps://github.com/ivankliuk/duckduckpy/tarball/0.2\u003e`_, extract archive contents and\nrun following command from the source directory:\n\n.. code:: bash\n\n    $ python setup.py install\n\nLatest upstream version can be installed directly from the git repository:\n\n.. code:: bash\n\n    $ pip install git+https://github.com/ivankliuk/duckduckpy.git\n\nAPI description\n---------------\n\n.. code-block:: python\n\n    query(query_string, secure=False, container=u'namedtuple', verbose=False,\n          user_agent=u'duckduckpy 0.2', no_redirect=False, no_html=False,\n          skip_disambig=False)\n\nGenerates and sends a query to DuckDuckGo API.\n\n**Arguments:**\n\n+---------------+-------------------------------------------------------------+\n| query_string  | Query to be passed to DuckDuckGo API.                       |\n+---------------+-------------------------------------------------------------+\n| secure        | Use secure SSL/TLS connection. Default - False.             |\n|               | Syntactic sugar is secure_query function which is passed    |\n|               | the same parameters.                                        |\n+---------------+-------------------------------------------------------------+\n| container     | Indicates how dict-like objects are serialized. There are   |\n|               | two possible options: namedtuple and dict. If 'namedtuple'  |\n|               | is passed the objects will be serialized to namedtuple      |\n|               | instance of certain class. If 'dict' is passed the objects  |\n|               | won't be deserialized. Default value: 'namedtuple'.         |\n+---------------+-------------------------------------------------------------+\n| verbose       | Don't raise any exception if error occurs.                  |\n|               | Default value: False.                                       |\n+---------------+-------------------------------------------------------------+\n| user_agent    | User-Agent header of HTTP requests to DuckDuckGo API.       |\n|               | Default value: 'duckduckpy 0.2'                             |\n+---------------+-------------------------------------------------------------+\n| no_redirect   | Skip HTTP redirects (for !bang commands).                   |\n|               | Default value: False.                                       |\n+---------------+-------------------------------------------------------------+\n| no_html       | Remove HTML from text, e.g. bold and italics.               |\n|               | Default value: False.                                       |\n+---------------+-------------------------------------------------------------+\n| skip_disambig | Skip disambiguation (D) Type. Default value: False.         |\n+---------------+-------------------------------------------------------------+\n| lang          | Override \"us-en\" language \u0026 region. Default - None.         |\n+---------------+-------------------------------------------------------------+\n\n**Raises:**\n\n+--------------------------+--------------------------------------------------+\n| DuckDuckDeserializeError | JSON serialization failed.                       |\n+--------------------------+--------------------------------------------------+\n| DuckDuckConnectionError  | Something went wrong with httplib operation.     |\n+--------------------------+--------------------------------------------------+\n| DuckDuckArgumentError    | Passed argument is wrong.                        |\n+--------------------------+--------------------------------------------------+\n\n**Returns:**\n\nContainer depends on container parameter. Each field in the response is\nconverted to the so-called snake case.\n\nUsage\n-----\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from duckduckpy import query\n    \u003e\u003e\u003e response = query('Python') # namedtuple is used as a container\n    \u003e\u003e\u003e response\n    Response(redirect=u'', definition=u'', image_width=0, ...}\n    \u003e\u003e\u003e type(response)\n    \u003cclass 'duckduckpy.api.Response'\u003e\n    \u003e\u003e\u003e response.related_topics[0]\n    Result(first_url=u'https://duckduckgo.com/Python', text=...)\n    \u003e\u003e\u003e type(response.related_topics[0])\n    \u003cclass 'duckduckpy.api.Result'\u003e\n\n    \u003e\u003e\u003e response = query('Python', container='dict') # dict as the container\n    \u003e\u003e\u003e type(response)\n    \u003ctype 'dict'\u003e\n    \u003e\u003e\u003e response\n    {u'abstract': u'', u'results': [], u'image_is_logo': 0, ...}\n    \u003e\u003e\u003e type(response['related_topics'][0])\n    \u003ctype 'dict'\u003e\n    \u003e\u003e\u003e response['related_topics'][0]\n    {u'first_url': u'https://duckduckgo.com/Python', u'text': ...}\n\n.. |package| image:: https://badge.fury.io/py/duckduckpy.svg\n    :target: http://badge.fury.io/py/duckduckpy\n    :alt: PyPI package\n.. |travis-ci| image:: https://travis-ci.org/ivankliuk/duckduckpy.svg?branch=master\n    :target: https://travis-ci.org/ivankliuk/duckduckpy\n    :alt: CI Status\n.. |coveralls| image:: https://coveralls.io/repos/ivankliuk/duckduckpy/badge.svg?branch=master\n    :target: https://coveralls.io/r/ivankliuk/duckduckpy?branch=master\n    :alt: Coverage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivankliuk%2Fduckduckpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivankliuk%2Fduckduckpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivankliuk%2Fduckduckpy/lists"}