Get bones associated with specific action in python
Following is one way of getting the bones in a given action. 

armature = bpy.context.scene.objects['Armature']
action = bpy.data.actions['ArmatureAction.002']

pose_bones = set()

for fcurve in action.fcurves:
    pose_bone_path = fcurve.data_path.rpartition('.')[0]
    pose_bone = armature.path_resolve(pose_bone_path)
    pose_bones.add(pose_bone)

&gt;&gt;&gt; pose_bones
{
    bpy.data.objects['Armature'].pose.bones["R_lower_jnt"],
    bpy.data.objects['Armature'].pose.bones["R_hip_jnt"], 
    bpy.data.objects['Armature'].pose.bones["R_thigh_jnt"]
}


Getting to the actual bone (that belongs to the data of the Armature) is accomplished like below

&gt;&gt;&gt; bone = armature.data.bones[pose_bone.name]
&gt;&gt;&gt; bone
bpy.data.armatures['Armature'].bones["R_hip_jnt"]


References


path_resolve
FCurve