<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How can I export a Feature Layer in AGOL to Shapefile, using API for Python? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-can-i-export-a-feature-layer-in-agol-to/m-p/781687#M1225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 16px;"&gt;In AGOL you can export a layer to Shapefile, but I can't do it with the API for Python. I have only achieved it with some layer, passing through CSV, but it gives me many errors (text fields that pass to numeric, or layers that do not find the delimiter). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 16px;"&gt;Can someone help me? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 16px;"&gt;Thank you very much&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 May 2018 10:41:45 GMT</pubDate>
    <dc:creator>SergioInfanzón</dc:creator>
    <dc:date>2018-05-07T10:41:45Z</dc:date>
    <item>
      <title>How can I export a Feature Layer in AGOL to Shapefile, using API for Python?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-can-i-export-a-feature-layer-in-agol-to/m-p/781687#M1225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 16px;"&gt;In AGOL you can export a layer to Shapefile, but I can't do it with the API for Python. I have only achieved it with some layer, passing through CSV, but it gives me many errors (text fields that pass to numeric, or layers that do not find the delimiter). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 16px;"&gt;Can someone help me? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 16px;"&gt;Thank you very much&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 10:41:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-can-i-export-a-feature-layer-in-agol-to/m-p/781687#M1225</guid>
      <dc:creator>SergioInfanzón</dc:creator>
      <dc:date>2018-05-07T10:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I export a Feature Layer in AGOL to Shapefile, using API for Python?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-can-i-export-a-feature-layer-in-agol-to/m-p/781688#M1226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An arcgis &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;Item&lt;/SPAN&gt; has an &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;export&lt;/SPAN&gt; method that will save to another format. For example:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GIS
gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;username&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'name'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'pass'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'ITEM_ID'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
item_shp &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;export&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;title&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'item_shapefile'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; export_format&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Shapefile'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# item_shp is stored on AGOL, it can be downloaded locally if desired&lt;/SPAN&gt;
item_shp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;download&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:50:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-can-i-export-a-feature-layer-in-agol-to/m-p/781688#M1226</guid>
      <dc:creator>J_R_Matchett</dc:creator>
      <dc:date>2021-12-12T08:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I export a Feature Layer in AGOL to Shapefile, using API for Python?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-can-i-export-a-feature-layer-in-agol-to/m-p/781689#M1227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI &lt;A href="https://community.esri.com/migrated-users/272316"&gt;J.R. Matchett&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this item be queried to reduce download sizes , say everything created in the last week for example ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jun 2019 14:06:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-can-i-export-a-feature-layer-in-agol-to/m-p/781689#M1227</guid>
      <dc:creator>PaulSweeney3</dc:creator>
      <dc:date>2019-06-21T14:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: How can I export a Feature Layer in AGOL to Shapefile, using API for Python?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-can-i-export-a-feature-layer-in-agol-to/m-p/781690#M1228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can query the features you want,&amp;nbsp;access the SpatialDataFrame, and export to a shapefile. For example:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;layer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layers&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
features &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;query&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'created_date &amp;gt;= CURRENT_TIMESTAMP - 7'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
features&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sdf&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatial&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;to_featureclass&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'./output.shp'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The output shapefile will be saved locally in this case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:50:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-can-i-export-a-feature-layer-in-agol-to/m-p/781690#M1228</guid>
      <dc:creator>J_R_Matchett</dc:creator>
      <dc:date>2021-12-12T08:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I export a Feature Layer in AGOL to Shapefile, using API for Python?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-can-i-export-a-feature-layer-in-agol-to/m-p/1619798#M11423</link>
      <description>&lt;P&gt;nothing like being 6&amp;nbsp;years late to the conversation, but I just discovered the easiest way to grab data from a REST end-point, with query option, and save as Shapefile&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.features import FeatureLayer

# query the FeatureLayer to produce a FeatureSet
print('querying the Feature Layer')
fl = FeatureLayer(_itemUrl)
features = fl.query(where='Shape is not NULL', out_sr=26911)

# save to disk
print('saving the Feature Layer to Shapefile')
features.save(save_location=_pathShps, out_name=_friendlyName + '.shp')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 21:21:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-can-i-export-a-feature-layer-in-agol-to/m-p/1619798#M11423</guid>
      <dc:creator>RDCOGIS</dc:creator>
      <dc:date>2025-05-30T21:21:34Z</dc:date>
    </item>
  </channel>
</rss>

