Record Info Request

The Search Service also allows Hosted Data to be searched by Id, rather than by location.

Contents

Request Parameters

The following table describes the parameters that can be used in a Record Info Request. This request is used to query the hosted data by Id, instead of by its location. Below is a table of parameters necessary to make a Record Info Request. Refer to the Common Parameters page for information on the common parameters.

Name Description
hostedData
HostedData
A list of hosted data sources to search against. This parameter is also listed in the Common Parameters documentation, but it necessary to make a Record Info Request.
ids
String[]
This is a list of the id's to return from the hosted data.

Response Parameters

The following table describes the parameters returned in the Response

Name Description JSON Example Return Value(s) XML Example Return Value(s)
info

This field contains information about the response.

The statuscode subfield is an integer return value. Refer to the status codes page for more details on our status codes and error messages.

The messages subfield is an array of error messages which describe the status

info:{
   statuscode: 691,
   messages: [
      "Shape was not provided, please provide."
   ]
}
<info>
   <statuscode>
      691
   </statuscode>
   <messages>  
      Shape was not provided, 
	  please provide. 
   </messages>

</info>
hostedData
HostedData
A hosted data source to pull the results from

{
  "name":"MQA.test",
  "extraCiteria":"city='lancaster'",
  "fields":[
	"Address1",
	"Address2",
	"City",
	"State",
	"Country",
	"Phone"
  ]
}

<hostedData>
  <name>MQA.test</name>
  <extraCriteria>city='lancaster'</extraCriteria>
  <fields>
	<field>Address1</field>
	<field>Address2</field>
	<field>City</field>
	<field>State</field>
	<field>Country</field>
	<field>Phone</field>
  </fields>
</hostedData>
ids
String[]
These are the record id's requested from the hosted data source ids: [1, 15, 25, "32S"]

<ids>
	<id>1</id>
	<id>15</id>
	<id>25</id>
	<id>32S</id>
</ids>
searchResult
SearchResult
The results of the search request. Refer to the SearchResult object documentation for details.

{
  "key":"282820",
  "name":"Heritage Ctr Museum-Lancaster Cnty",
  "sourceName":"MQA.test",
  "shapePoints":["40.037769","-76.30661"],
  "distanceUnit":"m",
  "distance":0.042897,
  "resultNumber":1,
  "fields":[
	{"value":"PA","name":"State"},
	{"value":"W King St","name":"Address1"},
	{"value":"US","name":"Country"},
	{"value":"Lancaster","name":"City"},
	{"value":"","name":"Phone"},
	{"value":"","name":"Address2"}
  ]
}

<searchResult>
  <key>282820</key>
  <name>Heritage Ctr Museum-Lancaster Cnty</name>
  <resultNumber>1</resultNumber>
  <distance>0.042897</distance>
  <distanceUnit>m</distanceUnit>
  <sourceName>MQA.test</sourceName>
  <shapePoints>
	<latLng>
	  <lat>40.037769</lat>
	  <lng>-76.30661</lng>
	</latLng>
  </shapePoints>
  <fields>
	<State>PA</State>
	<Address1>W King St</Address1>
	<Country>US</Country>
	<City>Lancaster</City>
	<Phone/>
	<Address2/>
  </fields>
</searchResult>

 

Advanced Record Info Sample


Options Value(s)
Hosted Data:
Ids:
Input Format:

(Output will be displayed below)

  © MapQuest, Inc. All rights reserved.    Privacy Policy | Terms of Use