It is definitely possible to do it. What I think the best way to do it would be to expose a GET API endpoint.
Depending on the complexity of the input parameters, you can either add it in the endpoint URL or have a body. (If you have a body a POST or PUT endpoint will be required).
How you structure it will depend on the complexity of your input(s) and output. You may need to use helper entities (non-persistable entities) for your processing, which you can map using import and export mapping
Check out this part of the Mendix docs: https://docs.mendix.com/howto/integration/publish-rest-service