If you don’t like to use the livestatus you also could get this information of the view directly as json output for simple parsing.
https://example.com/<SITE>/check_mk/view.py?host=<HOST>&service=<SERVICE>&site=<SITE>&view_name=service&output_format=json
This should also work with an automation user and secret attached.
@kdeutsch: is this still working in 2.0? i haven’t an installation at the moment. can you please check this?