Next Queries API
Created by Iago Fernández · last update December 10, 2019
Implementation
Here is an example of a simple implementation in Java to consume this service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Client client;
WebTarget target;
public void init(){
client = ClientBuilder.newClient();
target = client.target("https://api.empathybroker.com/search/v1/query/{instance_id}/nextqueries")
.queryParam("q","query") //Query parameters
.queryParam("lang","ES")
}
public JSON getResponse(String query){
return target.queryParam("q",query).request(MediaType.APPLICATION_JSON).get(JSON.class)
}
Output
The output will be a Json response that contains the next queries based on the initial query
1
2
3
4
5
6
7
8
[
{
"query": "jeans"
},
{
"query": "blouse"
}
]