Script to get the type (hold, breakdown, extreme) of active key
There doesn't seem to be a direct way to determine the keyframe by frame number. However you can iterate through the keyframes of a given object and check if the x-coordinate of the keyframe matches the current frame. Once you have retrieved the keyframe you can access the type.


  type 
  
  Type of keyframe (for visual purposes only)
  
  
  KEYFRAME Keyframe, Normal keyframe - e.g. for key poses.
  BREAKDOWN Breakdown, A breakdown pose - e.g. for transitions between key poses.
  MOVING_HOLD Moving Hold, A keyframe that is part of a moving hold.
  EXTREME Extreme, An ‘extreme’ pose, or some other purpose as needed.
  JITTER Jitter, A filler or baked keyframe for keying on ones, or some
  other purpose as needed.
  




import bpy

obj = bpy.data.objects["Cube"]
fcurves = obj.animation_data.action.fcurves
current_frame = bpy.context.scene.frame_current + bpy.context.scene.frame_subframe

for fcurve in fcurves:
    for keyframe in fcurve.keyframe_points:
        if keyframe.co[0] == current_frame:
            print(f"{keyframe.co}: {keyframe.type}")