Update / Create facts for vast number of hosts

Problem:
I know there’s an api which I can use in order to save or update facts for a host.
It works well, however, I am wondering if there’s better approach to CREATE or UPDATE facts for few thousands hosts? Without Puppet. Those facts are coming from an external service.
Should I still use the API or there’s an another way?
With API approach I would need to call Foreman API 10000 times or even more…

Expected outcome:
Able to create or update facts for many hosts in a relatively short time.
Foreman and Proxy versions:
latest 3.11
Foreman and Proxy plugin versions:
3.11
Distribution and version:
RedHat