FCurve handles to 3D Bézier spline control points
The points used by an fcurve are a 2D version of the bezier curves you use in the 3D viewport. To convert an fcurve into a 3D bezier curve we just need to add a Z axis value to the locations.

import bpy

anim_fcurves = bpy.context.object.animation_data.action.fcurves

# index 1 is the Y location fcurve
src_fcurve = anim_fcurves.find('location', index=1)

vis_curve = bpy.data.curves.new('YLocCurve', 'CURVE')
vis_spline = vis_curve.splines.new('BEZIER')
vis_spline.bezier_points.add(count=len(src_fcurve.keyframe_points)-1)

for i,fcp in enumerate(src_fcurve.keyframe_points):
    p = vis_spline.bezier_points[i]
    p.co = (fcp.co[0], fcp.co[1], 0.0)
    p.handle_left = (fcp.handle_left[0], fcp.handle_left[1], 0.0)
    p.handle_left_type = 'FREE'
    p.handle_right = (fcp.handle_right[0], fcp.handle_right[1], 0.0)
    p.handle_right_type = 'FREE'

data = bpy.data.objects.new('YLocCurve', vis_curve)
bpy.context.scene.objects.link(data)


That will turn an fcurve into a bezier curve object in the 3D viewport. How you export that to another application depends on the file format you are using, but in general you want the three locations for each point so that the other program uses the three points to define each point and it handles.

While mostly you can copy the handle type, the fcurve can have an AUTO_CLAMPED handle type that is not valid in a 3D bezier curve.