Warning

This site is no longer being maintained. Visit the eDocs documentation portal for updated information.

Visit eDocs
Dismiss message

Query Signals API

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

About this endpoint

This endpoint will return both, the related tags and next queries, for the query using only one endpoint.

GET
https://api.empathybroker.com/search/v1/query/{instance_id}/querysignals?{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
14
Client client;
WebTarget target;
public void init(){
    client = ClientBuilder.newClient();
    target = client.target("https://api.empathybroker.com/search/v1/query/{instance_id}/querysignals")
       //Query parameters
        .queryParam("lang","ES")

   
}
 
public JSON getResponse(String query){
    return target.queryParam("q",query).request(MediaType.APPLICATION_JSON).get(JSON.class)
}

Output

The endpoint will return a Json with the relatedTags and the nextQueries Nodes.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
    "nextQueries": [
        {
            "query": "jeans"
        },
        {
            "query": "blouse"
        }
    ],
    "relatedTags": [
        {
            "tag": "white",
            "query": "white shirt"
        },
        {
            "tag": "long sleeve",
            "query": "long sleeve shirt"
        },
        {
            "tag": "striped",
            "query": "shirt striped"
        }
    ]
}