<div><p>
</p>
<div id="content">
<h1>Find all US states with names starting with "mass"</h1>
<p>This example shows how to search Freebase for a list of all US states with names starting with "mass".
To see an explanation for any part of the query just move your cursor over that section of the query.</p>
<h2>Query</h2>
<div class="query query_part" title="Get the list of all US states with names starting with 'mass'">[
<div class="query_part" title="Match a US state with a name starting with 'mass'">
<div class="line"> {</div>
<div class="query_part" title="Match administrative divisions within the United States">
<div class="line"> <span class="property query_part" title="The country property for the administrative division.<br/>Short for /location/administrative_division/country">"country"</span> : {</div>
<div class="line"> <span class="property query_part" title="The ID property for the country topic.<br/>Short for /type/object/id">"id"</span> : <span class="id query_part" title="The Freebase ID for the United States of America topic">"/en/united_states"</span></div>
<div class="line"> },</div>
</div>
<div class="line query_part" title="Get the value of the administrative division's ISO 3166-2 code"> <span class="property query_part" title="The ISO 3166-2 code property of the administrative division.<br/>Short for /location/administrative_division/iso_3166_2_code">"iso_3166_2_code"</span> : <span class="constant query_part" title="Return the ISO 3166-2 code if one exists">null</span>,</div>
<div class="line query_part" title="Get the value of the administrative division's name"> <span class="property query_part" title="The name property of the topic.<br/>Short form for /common/topic/name">"name"</span> : <span class="constant query_part" title="Return the name of the administrative division if one exists">null</span>,</div>
<div class="line query_part" title="Match administrative divisions with a name that starts with 'mass'"> <span class="property query_part" title="A filter to match the name property of the topic against a string pattern.">"filter1:name~="</span> : <span class="string query_part" title="A pattern to match a string of text that starts with 'mass'">"^mass*"</span>,</div>
<div class="line query_part" title="Match topics with the Administrative Division type."> <span class="property query_part" title="The type property of the topic.<br/>Short for /type/object/type">"type"</span> : <span class="id query_part" title="The Freebase ID for the Administrative Division type from the Location domain">"/location/administrative_division"</span></div>
<div class="line"> }</div>
</div>
<div class="line">]</div>
</div>
<h2>Response</h2>
<div class="query query_part" title="The list of all US states with names starting with 'mass'">
<div class="line">[</div>
<div class="query_part" title="A matching US state with a name starting with 'mass' and all the empty property values filled in">
<div class="line"> {</div>
<div class="line"> <span class="property">"country"</span> : {</div>
<div class="line"> <span class="property">"id"</span> : <span class="id">"/en/united_states"</span></div>
<div class="line"> },</div>
<div class="line query_part" title="The ISO 3166-2 code of the matched administrative division"> <span class="property">"iso_3166_2_code"</span> : <span class="string">"US-MA"</span>,</div>
<div class="line query_part" title="The full name of the matched administrative division"> <span class="property">"name"</span> : <span class="string">"Massachusetts"</span>,</div>
<div class="line"> <span class="property">"type"</span> : <span class="id">"/location/administrative_division"</span></div>
<div class="line"> }</div>
</div>
<div class="line">]</div>
</div>
<p><a target="_blank" href="http://www.freebase.com/tools/queryeditor?q=%5B%7B%22country%22%3A%7B%22id%22%3A%22%2Fen%2Funited_states%22%7D%2C%22filter1%3Aname~%3D%22%3A%22%5Emass*%22%2C%22iso_3166_2_code%22%3Anull%2C%22name%22%3Anull%2C%22type%22%3A%22%2Flocation%2Fadministrative_division%22%7D%5D&read=1">Try the query for yourself in the Query Editor Tool</a></p>
</div>
${acre.require("/user/narphorium/common/attribution").basic()}
</div>