I see what you mean. It is not as easy as a single line, but you can drill down into fcurves and examine their modifier stack. The only way I could detect a modifier for deletion was by comparing to it’s RNA_PATH.
This code expects the default cube to have a location animation with a noise modifier applied to the fcurve.
ob = bpy.data.objects.get("Cube")
ad = ob.animation_data
fcurves = ad.action.fcurves
for f in fcurves:
mod_to_remove = None
for mod in f.modifiers:
if str(mod.rna_type) == '<bpy_struct, Struct("FModifierNoise")>':
mod_to_remove = mod
if mod_to_remove != None:
print ("Attempting to remove the noise modifier")
print ("Failed to detect the noise modifier")
After running the code, the fcurve modifier should be removed.