Thank you in advance.
Is there any way to check Shopware version through API. for example shop URL - https://example.shop.com
is a running Shopware 5 or Shopware 6 without using any credentials.
no, that is not possible, for both Shopware versions. This is totally intended, because disclosing its own version would be a high security breach.
If you want to differ between Shopware 5 and Shopware 6 you have to know which one you want to talk to via API beforehand, because the API routes are totally different.
Best regards from Schöppingen
Michael Telgmann