I want to create a custom page in Marketing cloud such that they interact with a third party using the third party API. How can I develop this page within Marketing cloud only?
It sounds like you need to create whats called a CloudPage. Refer to the following documentations.
For interacting with 3rd party APIs, I will in addition to CloudPages - being the standard tool for web pages on Marketing Cloud, look into SSJS, which is more capable of interacting with APIs, parsing JSON etc, than AMPScript.