Skip to content

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.

  1. 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"

  1. Receive feedback URI Templates in the response:
JSON
{
  "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": { ... }
}
  1. 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

POST https://www.mapquestapi.com/search/v3/prediction/feedback/d3e0c1f0-6859-4996-be7f-ef71485bb3e6/viewed/list/mqId:1234/mqId:4567/mqId:1122/mqId:8822

cURL Request

curl -X POST "https://www.mapquestapi.com/search/v3/prediction/feedback/d3e0c1f0-6859-4996-be7f-ef71485bb3e6/viewed/list/mqId:1234/mqId:4567/mqId:1122/mqId:8822"

They should be added in the order they were displayed.

  1. 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

POST https://www.mapquestapi.com/search/v3/prediction/feedback/d3e0c1f0-6859-4996-be7f-ef71485bb3e6/clicked/map/mqId:1122

cURL Request

curl -X POST "https://www.mapquestapi.com/search/v3/prediction/feedback/d3e0c1f0-6859-4996-be7f-ef71485bb3e6/clicked/map/mqId:1122"