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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DDGS Map Search

madhatter349 opened this issue · comments

`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

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)

@deedy5 thank you so much, that fixed it!