Next Queries Endpoint

Created by Iago Fernández · last update December 10, 2019

About this endpoint

The Query Signals endpoint return a set of next queries made by other users after the initial query.

GET https://api.empathybroker.com/search/v1/query/{instance_id}/nextqueries?{Input_Parameters}

Input Parameters

Parameter Data Type
q String
lang String

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
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"
    }
]