Store each animation frame as new object
You should avoid operators whenever possible:

import bpy

scene = bpy.context.scene
frame_current = scene.frame_current

for f in range(scene.frame_start, scene.frame_end + 1):
    scene.frame_set(f)

    meshes = []
    for ob in scene.objects:
        if ob.type == 'MESH' and ob.name.startswith("model"):
            me = ob.to_mesh(scene, True, 'PREVIEW')
            meshes.append(me)

    # do something with the meshes (note: they aren't linked to anything)

    # Clean up mesh copies
    for me in meshes:
        bpy.data.meshes.remove(me)

scene.frame_set(frame_current)


This will apply modifiers to all mesh objects in the current scene that start with the name model. The resulting (new!) mesh datablocks can be used for export.

Note however, that you will have to create objects and link the meshes to them if you plan to call an export operator - they usually export all (selected) objects, not invisible mesh datablocks. You may wanna check out the exporter code and see if you can import the actual export routine to avoid that operator call and maybe even the object creation.



If you want to apply animation in a way, that there's one static object per frame of an animated model, you may use the following script:

import bpy

scene = bpy.context.scene
frame_current = scene.frame_current

r = range(scene.frame_start, scene.frame_end + 1)
l = len(str(len(r)))
obs = []

for f in r:
    scene.frame_set(f)

    for ob in scene.objects:
        if ob.type == 'MESH' and ob.name.startswith("model"):
            me = ob.to_mesh(scene, True, 'PREVIEW')
            me.transform(ob.matrix_world)
            new_ob = bpy.data.objects.new("%s_frame%0*i" % (ob.name, l, f), me)
            obs.append(new_ob)

scene.frame_set(frame_current)
for ob in obs:
    scene.objects.link(ob)
scene.update()


It applies modifiers as well as transformations (.matrix_world, so loc/rot/scale).