To export all of your MetaLocator data in bulk, use the MetaLocator.exportLocations API method.
MetaLocator.exportLocations
Use our API Test tool to obtain the latest documentation on this and other API methods. exportLocations only requires two parameters, your username and password. The system will then return a complete XML response containing all of your location data in Struct format.
Username (String) : Your MetaLocator Username
Password (String) : Your MetaLocator Password
Record offset (string):
Record count (String)(limit 1000)
The record offset is only processed if a record count is provided and greater than 0.
The XML response is formatted as shown below, where each record is returned as a struct within a value element. Categories are included as "tag1", "tag2" and so on.
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>id</name>
<value>
<string>1</string>
</value>
</member>
<member>
<name>name</name>
<value>
<string>Sample Location Name</string>
</value>
</member>
<member>
<name>type</name>
<value>
<string />
</value>
</member>
<member>
<name>description</name>
<value>
<string />
</value>
</member>
<member>
<name>published</name>
<value>
<string>1</string>
</value>
</member>
<member>
<name>user_id</name>
<value>
<string>0</string>
</value>
</member>
<member>
<name>geo_failed</name>
<value>
<string>0</string>
</value>
</member>
<member>
<name>address</name>
<value>
<string>12345 MetaLocator Way</string>
</value>
</member>
<member>
<name>address2</name>
<value>
<string />
</value>
</member>
<member>
<name>city</name>
<value>
<string>Denver</string>
</value>
</member>
<member>
<name>state</name>
<value>
<string>CO</string>
</value>
</member>
<member>
<name>postalcode</name>
<value>
<string>80205</string>
</value>
</member>
<member>
<name>country</name>
<value>
<string />
</value>
</member>
<member>
<name>date</name>
<value>
<string />
</value>
</member>
<member>
<name>startdate</name>
<value>
<string>0000-00-00 00:00:00</string>
</value>
</member>
<member>
<name>enddate</name>
<value>
<string>0000-00-00 00:00:00</string>
</value>
</member>
<member>
<name>phone</name>
<value>
<string>123-123-1234</string>
</value>
</member>
<member>
<name>hours</name>
<value>
<string />
</value>
</member>
<member>
<name>fax</name>
<value>
<string />
</value>
</member>
<member>
<name>link</name>
<value>
<string />
</value>
</member>
<member>
<name>email</name>
<value>
<string />
</value>
</member>
<member>
<name>icon</name>
<value>
<string />
</value>
</member>
<member>
<name>tld</name>
<value>
<string />
</value>
</member>
<member>
<name>image</name>
<value>
<string />
</value>
</member>
<member>
<name>metadescription</name>
<value>
<string />
</value>
</member>
<member>
<name>metakeywords</name>
<value>
<string />
</value>
</member>
<member>
<name>language</name>
<value>
<string />
</value>
</member>
<member>
<name>sourcefile</name>
<value>
<string>us_short.csv</string>
</value>
</member>
<member>
<name>lng</name>
<value>
<string>-122.3788428</string>
</value>
</member>
<member>
<name>lat</name>
<value>
<string>47.269626</string>
</value>
</member>
<member>
<name>publishstart</name>
<value>
<string />
</value>
</member>
<member>
<name>publishend</name>
<value>
<string />
</value>
</member>
<member>
<name>tag1</name>
<value>
<string />
</value>
</member>
<member>
<name>isdirty</name>
<value>
<string />
</value>
</member>
<member>
<name>marker</name>
<value>
<string />
</value>
</member>
<member>
<name>marker_shadow</name>
<value>
<string />
</value>
</member>
<member>
<name>marker_text</name>
<value>
<string />
</value>
</member>
<member>
<name>fg_marker_color</name>
<value>
<string />
</value>
</member>
<member>
<name>bg_marker_color</name>
<value>
<string />
</value>
</member>
<member>
<name>marker_order</name>
<value>
<string>33</string>
</value>
</member>
<member>
<name>priority</name>
<value>
<string />
</value>
</member>
<member>
<name>priority_name</name>
<value>
<string>Restaurant</string>
</value>
</member>
<member>
<name>taglist</name>
<value>
<string>Restaurant|,</string>
</value>
</member>
<member>
<name>title</name>
<value>
<string>Flossy McGrews</string>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
XML can be transformed with XSL into practically any format, this sample XSL shows a very basic transformation.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
<!ENTITY copy "©">
<!ENTITY reg "®">
<!ENTITY trade "™">
<!ENTITY mdash "—">
<!ENTITY ldquo "“">
<!ENTITY rdquo "”">
<!ENTITY pound "£">
<!ENTITY yen "¥">
<!ENTITY euro "€">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Sample MetaLocator XSL Transformation</title>
</head>
<body>
<xsl:for-each select="methodResponse/params/param/value/array/data/value/struct/member">
Field Name: <xsl:value-of select="name"/><br /> Field Value:<xsl:value-of select="value"/><br />
<hr />
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>