Skip to content


Repository files navigation

Maven Central Codacy Badge codecov


Dadata Suggestions API client for Spring (Java)


Dadata API client based on non-blocking HTTP client of Spring WebClient. Supports all methods of Suggestion API

Add a dependency


dependencies {
        implementation 'com.github.kuliginstepan:dadata-client:Tag'




Dadata client provides DadataClientAutoConfiguration which configures DadataClient bean for you.

Primary settings

It's required to add property dadata.client.token with your Dadata API Token.

You may add property dadata.client.timeout to configure dadata client request timeout, defaults to 5 seconds.

Via dadata.client.baseUrl you can change Dadata base url, defaults to

dadata.client.maxInMemorySize defines max buffer size for response, defaults to 512K. You can change it if you have memory issues.

Proxy support and SSL verification

dadata.client.proxy.type - valid values are: HTTP, SOCKS4, SOCKS5, defaults to HTTP

dadata.client.proxy.server - proxy hostname or ip address

dadata.client.proxy.port - proxy port, positive number

If you have configured above options you can use authentication via username/password pair just setting system properties for them.

  • for HTTP proxy you should use http.proxyUser and http.proxyPassword respectively.
  • for SOCKS proxy you should use and respectively.

There is no authorization at proxy if no username defined in system environment.

dadata.client.verifySsl - enable/disable server SSL-certificate verification at client-side, defaults to true


Autowire DadataClient in your beans and call api methods, for example:

public class SomeService {
    private DadataClient client;
    public Flux<Suggestion<Address>> getSuggestionsForAddress(String query) {
        return client.suggestAddress(AddressRequestBuilder.create(query).build());

Request builders allow filter and rank suggestions. More examples are available in the test module