public boolean checkAvail() {
        try (CloseableHttpClient httpClient = HttpClientBuilder.create().build()) {
            HttpGet httpGet = new HttpGet(url + PING);

            HttpResponse resp = httpClient.execute(httpGet);
            if (resp.getStatusLine().getStatusCode() == 200) {
                return true;
            }

        } catch (Exception e) {
            LOG.error(e.getMessage(), e);
        }

        return false;
    }
Ping lucene-geo-gazetteer API

@return true if API is available else returns false
tika-parsers/tika-parsers-ml/tika-parser-nlp-module/src/main/java/org/apache/tika/parser/geo/topic/gazetteer/GeoGazetteerClient.java