Our API

The 4h API opens up a world of possibilities for integrating our URL shortener with your favorite CMS, blog, or other third party software. It can be freely used by all developers, and you do not need to register. The API creates a short version of your long URL. You only have to send your long URL and read the result. Everything else happens automatically.

How to Use

Send your long URL to the 4h API URL. Each successful request returns a short URL. The long URL sent to our API must be encoded. Please check the URL encoding information in this Wikipedia article.

API URL

https://4h.net/api.php

Parameters

Name Required Value
url YES Encoded URL

Example Request

https://4h.net/api.php?url=YOUR_LONG_URL