How to call api in repeater via database?

You have multiple errors in your code, some of which are even marked in the Editor’s code panel.

You should first review the Corvid documentation:
Corvid Articles
Corvid API Reference
Pay special attention to the discussion on $w .