deedy5 / duckduckgo_search

Search for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com search engine. Downloading files and images to a local hard drive.
MIT License
927 stars 117 forks source link

DDGS Map Search #187

Closed madhatter349 closed 4 months ago

madhatter349 commented 4 months ago

`from duckduckgo_search import DDGS

with DDGS() as ddgs: for r in ddgs.maps("coffee shops", postalcode="10001", max_results=10): print(r)`

When trying to search this for example I get no results, the only map search that seems to work is if you use "place".

Thanks

deedy5 commented 4 months ago

summary: 1) fixed in v4.4.3, update pip install -U duckduckgo_search 2) zip-codes may be the same in different countries - 10001, so with postalcode also use at least country parameter 3) increase the radius, because postalcode returns a very small area on the map

code example:

from duckduckgo_search import DDGS

with DDGS() as ddgs:
    for r in ddgs.maps("coffee shops", country="algeria", postalcode="10001", radius=10, max_results=10):
        print(r)
madhatter349 commented 4 months ago

@deedy5 thank you so much, that fixed it!