Search API
GET Record Info Search
This function performs a lookup on hosted data items by specific record ID.
Resource URL
Resource Information
Response Formats | JSON, XML |
Authentication | Yes (Requires Key) |
Rate Limited | Yes |
URL Parameters
Request Parameter | Description | Required |
---|---|---|
key | The API Key, which is needed to make requests to MapQuest services. | Yes |
hostedData HostedData | A list of hosted data sources to search against. | Yes |
ids String[] | This is a list of the id's to return from the hosted data. | Yes |
outFormat | Specifies the format of the response. Must be one of the following, if supplied:
json if not supplied | No |
callback | A JavaScript function name. The JSON-formatted response will be wrapped in a call to the supplied callback function name to provide JSONP functionality. This functionality might be needed to do cross-site scripting. See the Wikipedia.org entry for JSON for more details. | No |
Response
Response Field | Description |
---|---|
info | This field contains information about the response. The status code sub-field is an integer return value. Refer to the status codes page for more details on our status codes and error messages. The messages sub-field is an array of error messages which describe the status |
hostedData HostedData | A hosted data source to pull the results from |
ids String[] | These are the record id's requested from the hosted data source |
searchResult SearchResult | The results of the search request. Refer to the SearchResult object documentation for details. |
Example Request
JSON
{
"searchResults": [
{
"resultNumber": 1,
"sourceName": "mqap.ntpois",
"name": "Home Sewing Center",
"shapePoints": [
40.578242,
-75.476315
],
"key": "284411d9-57f8-4b8d-86b7-319de4826dbc",
"fields": {
"phone": "6107972107",
"side_of_street": "R",
"group_sic_code": "572218",
"state": "PA",
"lng": -75.476315,
"group_sic_code_name": "Sewing Machines-Household",
"city": "Allentown",
"country": "US",
"group_sic_code_name_ext": "Sewing Machines-Household::Sewing Machines-Repairing",
"id": "273492671",
"mqap_geography": {
"latLng": {
"lng": -75.476315,
"lat": 40.578242
}
},
"address": "1901 S 12th St",
"postal_code": "18103",
"name": "Home Sewing Center",
"mqap_id": "284411d9-57f8-4b8d-86b7-319de4826dbc",
"group_sic_code_ext": "572218::769925",
"disp_lat": 40.578242,
"lat": 40.578242,
"disp_lng": -75.476315
}
},
{
"resultNumber": 2,
"sourceName": "mqap.ntpois",
"name": "D S C Logistics",
"shapePoints": [
40.567149,
-75.622408
],
"key": "998badfd-3ba4-4a14-9bfc-fe5f4bd7ac5b",
"fields": {
"phone": "4846647059",
"side_of_street": "L",
"group_sic_code": "874201",
"state": "PA",
"lng": -75.622408,
"group_sic_code_name": "Business Management Consultants",
"city": "Breinigsville",
"country": "US",
"group_sic_code_name_ext": "Business Management Consultants",
"id": "42068783",
"mqap_geography": {
"latLng": {
"lng": -75.622408,
"lat": 40.567149
}
},
"address": "250 Boulder Dr",
"postal_code": "18031",
"name": "D S C Logistics",
"mqap_id": "998badfd-3ba4-4a14-9bfc-fe5f4bd7ac5b",
"group_sic_code_ext": "874201",
"disp_lat": 40.567149,
"lat": 40.567149,
"disp_lng": -75.622408
}
}
],
"ids": [
"998badfd-3ba4-4a14-9bfc-fe5f4bd7ac5b",
"284411d9-57f8-4b8d-86b7-319de4826dbc"
],
"resultsCount": 2,
"hostedData": [
{
"tableName": "mqap.ntpois",
"extraCriteria": "",
"columnNames": []
}
],
"totalPages": 1,
"info": {
"statusCode": 0,
"copyright": {
"text": "© 2023 MapQuest, Inc.",
"imageUrl": "https://api.mqcdn.com/res/mqlogo.gif",
"imageAltText": "© 2023 MapQuest, Inc."
},
"messages": []
},
"options": {
"kmlStyleUrl": "http://www.search.mapquestapi.com/kml-default.kml",
"shapeFormat": "raw",
"pageSize": 2,
"currentPage": 1,
"units": "m",
"maxMatches": 100
}
}
XML
<?xml version="1.0" encoding="UTF-8"?>
<response>
<info>
<statusCode>0</statusCode>
<messages/>
<copyright>
<imageUrl>https://api.mqcdn.com/res/mqlogo.gif</imageUrl>
<imageAltText>© 2023 MapQuest, Inc.</imageAltText>
<text>© 2023 MapQuest, Inc.</text>
</copyright>
</info>
<search>
<options>
<maxMatches>100</maxMatches>
<units>m</units>
<shapeFormat>raw</shapeFormat>
<kmlStyleUrl>http://www.search.mapquestapi.com/kml-default.kml</kmlStyleUrl>
<currentPage>1</currentPage>
<pageSize>2</pageSize>
</options>
<resultsCount>2</resultsCount>
<totalPages>1</totalPages>
<hostedDataList>
<hostedData>
<tableName>mqap.ntpois</tableName>
<columnNames/>
</hostedData>
</hostedDataList>
<searchResults>
<searchResult>
<key>284411d9-57f8-4b8d-86b7-319de4826dbc</key>
<name>Home Sewing Center</name>
<resultNumber>1</resultNumber>
<sourceName>mqap.ntpois</sourceName>
<shapePoints type="point">
<latLng>
<lat>40.578242</lat>
<lng>-75.476315</lng>
</latLng>
</shapePoints>
<fields>
<phone>6107972107</phone>
<side_of_street>R</side_of_street>
<group_sic_code>572218</group_sic_code>
<state>PA</state>
<lng>-75.476315</lng>
<group_sic_code_name>Sewing Machines-Household</group_sic_code_name>
<city>Allentown</city>
<country>US</country>
<group_sic_code_name_ext>Sewing Machines-Household::Sewing Machines-Repairing</group_sic_code_name_ext>
<id>273492671</id>
<mqap_geography>POINT (-75.476315 40.578242)</mqap_geography>
<address>1901 S 12th St</address>
<group_sic_code_ext>572218::769925</group_sic_code_ext>
<mqap_id>284411d9-57f8-4b8d-86b7-319de4826dbc</mqap_id>
<name>Home Sewing Center</name>
<postal_code>18103</postal_code>
<disp_lat>40.578242</disp_lat>
<lat>40.578242</lat>
<disp_lng>-75.476315</disp_lng>
</fields>
</searchResult>
<searchResult>
<key>998badfd-3ba4-4a14-9bfc-fe5f4bd7ac5b</key>
<name>D S C Logistics</name>
<resultNumber>2</resultNumber>
<sourceName>mqap.ntpois</sourceName>
<shapePoints type="point">
<latLng>
<lat>40.567149</lat>
<lng>-75.622408</lng>
</latLng>
</shapePoints>
<fields>
<phone>4846647059</phone>
<side_of_street>L</side_of_street>
<group_sic_code>874201</group_sic_code>
<state>PA</state>
<lng>-75.622408</lng>
<group_sic_code_name>Business Management Consultants</group_sic_code_name>
<city>Breinigsville</city>
<country>US</country>
<group_sic_code_name_ext>Business Management Consultants</group_sic_code_name_ext>
<id>42068783</id>
<mqap_geography>POINT (-75.622408 40.567149)</mqap_geography>
<address>250 Boulder Dr</address>
<group_sic_code_ext>874201</group_sic_code_ext>
<mqap_id>998badfd-3ba4-4a14-9bfc-fe5f4bd7ac5b</mqap_id>
<name>D S C Logistics</name>
<postal_code>18031</postal_code>
<disp_lat>40.567149</disp_lat>
<lat>40.567149</lat>
<disp_lng>-75.622408</disp_lng>
</fields>
</searchResult>
</searchResults>
<ids>
<id>998badfd-3ba4-4a14-9bfc-fe5f4bd7ac5b</id>
<id>284411d9-57f8-4b8d-86b7-319de4826dbc</id>
</ids>
</search>
</response>