URL Shortener
Provides a URL shortener API service, enabling developers to quickly generate short links and integrate them into business systems.
Documentation
URL Shortener API Overview
The URL Shortener API helps developers quickly generate short links within their systems. It returns structured results and is ideal for business integration, automated API calls, and system docking.
Use Cases
- Integrate URL shortening capabilities into internal systems, SaaS platforms, automated workflows, or operational backends.
- Suitable for business scenarios requiring stable API calls, standardized responses, and orchestratable interfaces.
- We recommend combining this with rate limiting, failure retries, and result caching strategies to improve overall integration stability.
Integration Guidelines
- Before integrating, confirm the request parameter formats, authentication methods, and error code handling logic.
- For high-frequency generation scenarios, it is recommended to implement log tracking, timeout control, and idempotency handling.
- If the results are used for risk control or automated decision-making, we advise applying secondary judgments based on your business rules rather than relying solely on the API response.
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
Request Example
{
"longUrl": "https://www.toolkk.com/apis/idcard-validate",
"length": 6
}Response Example
{
"code": "SUCCESS",
"message": "success",
"data": {
"shortUrl": "https://t.kk/abc123",
"longUrl": "https://www.toolkk.com/apis/idcard-validate"
}
}Request Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| longUrl | string | https://www.toolkk.com/apis/idcard-validate |
| length | number | 6 |
Response Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| code | string | SUCCESS |
| message | string | success |
| data | object | {...} |
| data.shortUrl | string | https://t.kk/abc123 |
| data.longUrl | string | https://www.toolkk.com/apis/idcard-validate |