How to link animation data with python
Make sure you have the right name
The operator is bpy.ops.object.make_links_data()  note it's object not plural.
The error.
&gt;&gt;&gt; bpy.ops.objects.make_links_data()
Traceback (most recent call last):
  File &quot;&lt;blender_console&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/home/batfinger/blender-git/xxx/bin/2.91/scripts/modules/bpy/ops.py&quot;, line 202, in __call__
    ret = op_call(self.idname_py(), None, kw)
AttributeError: Calling operator &quot;bpy.ops.objects.make_links_data&quot; error, could not be found

No error.
&gt;&gt;&gt; bpy.ops.object.make_links_data(type='ANIMATION')
{'FINISHED'}

The active object is the source the other selected objects the targets.
Set active object with python.
To sum up, to make links from &quot;Cube&quot; to cones &quot;Cone&quot;, &quot;Cone.001&quot;, &quot;Cone.002&quot; would
obj = context.scene.objects.get(&quot;Cube&quot;) 
if obj:
    context.view_layer.objects.active = obj
    for o in (&quot;Cone&quot;, &quot;Cone.001&quot;, &quot;Cone.002&quot;):
        o.select_set(True)

    bpy.ops.object.make_links_data(type='ANIMATION')