The AppBrain API allows you to programmatically access data about apps on Google Play. Queries for specific apps, search and browse are supported. AppBrain advertisers can manage their campaign.
Add this dependency to your project's POM:
<dependency>
<groupId>com.appbrain</groupId>
<artifactId>appbrain-api-client</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
</dependency>Add this dependency to your project's build file:
implementation "com.appbrain:appbrain-api-client:1.2.0"Please follow the installation instruction and execute the following Java code:
packagecom.appbrain.client.demo;
importcom.appbrain.client.ApiClient;
importcom.appbrain.client.ApiException;
importcom.appbrain.client.Configuration;
importcom.appbrain.client.api.InformationApi;
importcom.appbrain.client.model.AppInfoList;
publicclassApiClientDemo {
publicstaticvoidmain(String[] args) {
ApiClientapiClient = Configuration.getDefaultApiClient();
// Get the API key from https://developers.appbrain.com/dev_dashboard#DevPagePlace:page=api// for more information see: https://www.appbrain.com/docs/api/appbrain-apiapiClient.setApiKey("<APIKEY>");
InformationApiapi = newInformationApi(apiClient);
Stringsort = null;
Stringfilter = null;
Stringcategory = null;
try {
AppInfoListresult = api.searchApps("youtube", sort, filter, category, 0, null);
System.out.println(result.getApps().get(0));
} catch (ApiExceptione) {
System.err.println(" " + e);
System.err.println(" " + e.getResponseBody());
}
}
}
Please see here: https://www.appbrain.com/docs/api/specification
It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.
AppBrain API Team - contact@appbrain.com