Providing Feedback
MapQuest provides a feedback API that can be used to enhance the quality of the results returned from the Search Ahead API. Usage of this service is optional, but if you wish to participate details are given below. Note that inclusion of the anonymous user id header (x-mq-user-id
) in the initial request is required for platforms using the feedback API; without this header, feedback submissions will be ignored.
- Make a request with feedback=true and anonymous user id header set:
Example Request
GET x-mq-user-id: ABC-123 https://www.mapquestapi.com/search/v3/prediction?key=KEY&limit=5&feedback=true&collection=airport&q=den
cURL Request
curl -X GET -H "x-mq-user-id: ABC-123" "https://www.mapquestapi.com/search/v3/prediction?key=KEY&limit=5&feedback=true&collection=airport&q=den"
- Receive feedback URI Templates in the response:
{
"feedback": {
"resultClickedUrl": "https://www.mapquestapi.com/search/v3/prediction/feedback/d3e0c1f0-6859-4996-be7f-ef71485bb3e6/clicked/list{/id}",
"resultViewedUrl": "https://www.mapquestapi.com/search/v3/prediction/feedback/d3e0c1f0-6859-4996-be7f-ef71485bb3e6/viewed/list{/id*}",
"mapResultClickedUrl": "https://www.mapquestapi.com/search/v3/prediction/feedback/d3e0c1f0-6859-4996-be7f-ef71485bb3e6/clicked/map{/id}",
"mapResultViewedUrl": "https://www.mapquestapi.com/search/v3/prediction/feedback/d3e0c1f0-6859-4996-be7f-ef71485bb3e6/viewed/map{/id*}"
},
"request": { ... },
"results": { ... }
}
- If the results are displayed in a list or on a map, replace {/id*} with the IDs displayed in the corresponding URL (resultViewedUrl or mapResultViewedUrl) and POST to the resulting URL:
Example Request
cURL Request
They should be added in the order they were displayed.
- If there is direct interaction with a result (such as a click/tap), replace {/id} with the ID in the URL corresponding to the medium interacted with (resultClickedUrl for list and mapResultClickedUrl for map) and POST to the resulting URL:
Example Request
cURL Request
curl -X POST "https://www.mapquestapi.com/search/v3/prediction/feedback/d3e0c1f0-6859-4996-be7f-ef71485bb3e6/clicked/map/mqId:1122"