For example, I'm wanting to
itemsList = gis.content.search(query = 'created: [1514768400000 TO 1546218000000]',
max_items = 10000000,
item_type != 'Image Collection')
which returns
itemsList = gis.content.search('created: [1514768400000 TO 1546218000000]',
max_items = 10000000,
item_type != 'Image Collection')
from the error message only, it looks like the first parameter just wants the string with the parameter = bit
From the help topic on dir(gis.content.search)
Definition : search(query, item_type=None, sort_field='avgRating', sort_order='desc', max_items=10, outside_org=False, categories=None, category_filters=None)
So would the conclusion be no, it is not possible to use exclusion operators in
gis.content.search?
You just add the query string inside the quotes.
search_result = gis.content.search(query="owner:some_user NOT Feature Service")
Search reference—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers
inside the () you can only use = it is just an assignment parameter_1=some_value