Index: /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikiSearchTextResultListPanel.java
===================================================================
--- /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikiSearchTextResultListPanel.java	(revision 32670)
+++ /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikiSearchTextResultListPanel.java	(revision 32670)
@@ -0,0 +1,23 @@
+package org.wikipedia;
+
+import java.util.concurrent.Executors;
+
+import org.openstreetmap.josm.gui.widgets.SearchTextResultListPanel;
+import org.openstreetmap.josm.tools.Utils;
+
+abstract class WikiSearchTextResultListPanel<T> extends SearchTextResultListPanel<T> {
+
+    protected final Debouncer debouncer = new Debouncer(
+            Executors.newSingleThreadScheduledExecutor(Utils.newThreadFactory("wikipedia-search-%d", Thread.NORM_PRIORITY)));
+
+    public T getSelectedItem() {
+        final T selected = lsResult.getSelectedValue();
+        if (selected != null) {
+            return selected;
+        } else if (!lsResultModel.isEmpty()) {
+            return lsResultModel.getElementAt(0);
+        } else {
+            return null;
+        }
+    }
+}
Index: /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikidataItemSearchDialog.java
===================================================================
--- /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikidataItemSearchDialog.java	(revision 32669)
+++ /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikidataItemSearchDialog.java	(revision 32670)
@@ -11,9 +11,7 @@
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.TreeSet;
-import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
@@ -31,5 +29,4 @@
 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionListItem;
 import org.openstreetmap.josm.gui.util.GuiHelper;
-import org.openstreetmap.josm.gui.widgets.SearchTextResultListPanel;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.Predicate;
@@ -120,8 +117,5 @@
     }
 
-    private static class Selector extends SearchTextResultListPanel<WikipediaApp.WikidataEntry> {
-
-        final Debouncer debouncer = new Debouncer(
-                Executors.newSingleThreadScheduledExecutor(Utils.newThreadFactory("wikidata-search-%d", Thread.NORM_PRIORITY)));
+    private static class Selector extends WikiSearchTextResultListPanel<WikipediaApp.WikidataEntry> {
 
         Selector() {
@@ -135,15 +129,4 @@
                 }
             });
-        }
-
-        public WikipediaApp.WikidataEntry getSelectedItem() {
-            final WikipediaApp.WikidataEntry selected = lsResult.getSelectedValue();
-            if (selected != null) {
-                return selected;
-            } else if (!lsResultModel.isEmpty()) {
-                return lsResultModel.getElementAt(0);
-            } else {
-                return null;
-            }
         }
 
Index: /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java
===================================================================
--- /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java	(revision 32669)
+++ /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java	(revision 32670)
@@ -264,4 +264,30 @@
             }
             return r;
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    static List<String> getCategoriesForPrefix(final String wikipediaLang, final String prefix) {
+        try {
+            final String url = getSiteUrl(wikipediaLang) + "/w/api.php"
+                    + "?action=query"
+                    + "&list=prefixsearch"
+                    + "&format=xml"
+                    + "&psnamespace=14"
+                    + "&pslimit=50"
+                    + "&pssearch=" + Utils.encodeUrl(prefix);
+            // parse XML document
+            try (final InputStream in = HttpClient.create(new URL(url)).setReasonForRequest("Wikipedia").connect().getContent()) {
+                final Document doc = DOCUMENT_BUILDER.parse(in);
+                final NodeList nodes = (NodeList) X_PATH.compile("//ps/@title").evaluate(doc, XPathConstants.NODESET);
+                final List<String> categories = new ArrayList<>(nodes.getLength());
+                for (int i = 0; i < nodes.getLength(); i++) {
+                    final Node node = nodes.item(i);
+                    final String value = node.getNodeValue();
+                    categories.add(value.contains(":") ? value.split(":", 2)[1] : value);
+                }
+                return categories;
+            }
         } catch (Exception ex) {
             throw new RuntimeException(ex);
Index: /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaCategorySearchDialog.java
===================================================================
--- /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaCategorySearchDialog.java	(revision 32670)
+++ /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaCategorySearchDialog.java	(revision 32670)
@@ -0,0 +1,84 @@
+// License: GPL. For details, see LICENSE file.
+package org.wikipedia;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.ExtendedDialog;
+import org.openstreetmap.josm.gui.util.GuiHelper;
+
+public final class WikipediaCategorySearchDialog extends ExtendedDialog {
+
+    private final Selector selector;
+    private static final WikipediaCategorySearchDialog INSTANCE = new WikipediaCategorySearchDialog();
+
+    private WikipediaCategorySearchDialog() {
+        super(Main.parent, tr("Search Wikipedia category"), new String[]{tr("Load category"), tr("Cancel")});
+        this.selector = new Selector();
+        this.selector.setDblClickListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                buttonAction(0, null);
+            }
+        });
+
+        setContent(selector, false);
+        setPreferredSize(new Dimension(600, 300));
+    }
+
+    /**
+     * Returns the unique instance of {@code MenuItemSearchDialog}.
+     *
+     * @return the unique instance of {@code MenuItemSearchDialog}.
+     */
+    public static synchronized WikipediaCategorySearchDialog getInstance() {
+        return INSTANCE;
+    }
+
+    @Override
+    public ExtendedDialog showDialog() {
+        selector.init();
+        super.showDialog();
+        selector.clearSelection();
+        selector.requestFocus();
+        return this;
+    }
+
+    public String getCategory() {
+        return selector.getSelectedItem();
+    }
+
+    @Override
+    protected void buttonAction(int buttonIndex, ActionEvent evt) {
+        super.buttonAction(buttonIndex, evt);
+    }
+
+    private static class Selector extends WikiSearchTextResultListPanel<String> {
+
+        @Override
+        protected void filterItems() {
+            final String query = edSearchText.getText();
+            debouncer.debounce(Void.class, new Runnable() {
+                @Override
+                public void run() {
+                    final List<String> entries = query == null || query.isEmpty()
+                            ? Collections.<String>emptyList()
+                            : WikipediaApp.getCategoriesForPrefix(WikipediaToggleDialog.wikipediaLang.get(), query);
+                    GuiHelper.runInEDT(new Runnable() {
+                        @Override
+                        public void run() {
+                            lsResultModel.setItems(entries);
+                        }
+                    });
+                }
+            }, 200, TimeUnit.MILLISECONDS);
+        }
+    }
+}
Index: /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaToggleDialog.java
===================================================================
--- /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaToggleDialog.java	(revision 32669)
+++ /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaToggleDialog.java	(revision 32670)
@@ -205,7 +205,10 @@
         @Override
         public void actionPerformed(ActionEvent e) {
-            final String category = JOptionPane.showInputDialog(
-                    Main.parent,
-                    tr("Enter the Wikipedia category"));
+            final WikipediaCategorySearchDialog categorySearchDialog = WikipediaCategorySearchDialog.getInstance();
+            categorySearchDialog.showDialog();
+            if (categorySearchDialog.getValue() != 1) {
+                return;
+            }
+            final String category = categorySearchDialog.getCategory();
             if (category == null) {
                 return;
Index: /applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia/WikipediaAppTest.java
===================================================================
--- /applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia/WikipediaAppTest.java	(revision 32669)
+++ /applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia/WikipediaAppTest.java	(revision 32670)
@@ -6,4 +6,5 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.tools.Predicate;
+import org.openstreetmap.josm.tools.Predicates;
 import org.openstreetmap.josm.tools.Utils;
 import org.wikipedia.WikipediaApp.WikipediaEntry;
@@ -214,3 +215,9 @@
         assertThat(entry3.getWiwosmStatus(), is(false));
     }
+
+    @Test
+    public void testCategoriesForPrefix() throws Exception {
+        final List<String> categories = WikipediaApp.getCategoriesForPrefix("de", "Gemeinde in Öster");
+        assertTrue(Utils.exists(categories, Predicates.equalTo("Gemeinde in Österreich")));
+    }
 }
