How to read Auto Keyframing state in Python?
Tip turn on developer extras and tooltips in Edit &gt; Preferences &gt; Interface &gt; Display
Then mouse over the button and will see that it is boolean property to turn on off.  https://docs.blender.org/api/current/bpy.types.ToolSettings.html#bpy.types.ToolSettings.use_keyframe_insert_auto
scene.tool_settings.use_keyframe_insert_auto

Use in conjunction with the enum  https://docs.blender.org/api/current/bpy.types.ToolSettings.html#bpy.types.ToolSettings.auto_keying_mode
scene.tool_settings.auto_keying_mode