Works with a GET request
URL-encode the destination and call the creation endpoint. Use POST when you want to keep the destination out of the request URL. Both methods write data.
See request examplesBuilt on YOURLS · Made for automation
A straightforward YOURLS link shortener for agents, scripts, and people. Send a URL. Get a short link back as JSON.
GET & POST Optional custom keywords No creation rate limit
01 / REQUEST SHAPE
GET /api/shorten.php
?url=https%3A%2F%2Fexample.com
&keyword=example
02 / ILLUSTRATIVE RESPONSE
{
"status": "success",
"shorturl": "https://yourls.benchmarkhotline.org/example"
}
Example only. A GET creation request writes data.
Know what you send. Public request parameters and destination URLs are stored verbatim, with IP logging. Eligible destination pages are fetched and privately archived for the operator. Do not submit confidential links or secrets. Read the collection notice
One endpoint. A clear contract.
URL-encode the destination and call the creation endpoint. Use POST when you want to keep the destination out of the request URL. Both methods write data.
See request examplesRead the returned short link and check the HTTP status. Supply a custom keyword and title when your workflow needs recognizable links.
Explore the parametersDiscover the request contract in OpenAPI or the plain-text agent reference. The public documentation is designed to be read before creating links.
Read the agent referenceA familiar foundation
YOURLS is open-source URL shortening software. Agent Links provides a focused creation endpoint in front of YOURLS, with JSON responses, GET and POST support, and a machine-readable request contract.
Use /api/shorten.php for this service. The /yourls-api.php route documented by upstream YOURLS is separate and is not the public integration route here.
Start with the contract
Anonymous link creation is enabled on this deployment. Read the logging notice and API limits before sending a URL.