Hello,
I'm trying to create a Python script within Jupyter Notebooks that will allow me to search all publicly available items within ArcGIS online that contain a specific feature service. Here is the script I have so far.
import arcgis
from arcgis.gis import GIS
# connect to ArcGIS Online
gis = GIS("https://www.arcgis.com")
feature_service_id = "FEATURE SERVICE ID"
print('connected to arcgis online')
# search for all publicly available feature services
web_maps = gis.content.search(query= feature_service_id, item_type = 'web map', outside_org=True, max_items = 200)
print('Found public items')
# print the titles of the feature services
for item in web_maps:
print('NAME: ' + item.title,'OWNER: ' + item.owner)
print('completed')
I cant seem to figure out how to return the webmaps that contain the feature service specified. Any help is appreciated.
Thanks.
Hey Dave,
Does adding display (web_maps) to the end of your code return the desired result?