Developer

REST API

Integrate NabzClan Adcode into your workflows. Create short links, wrap iOS manifests, and pull live stats programmatically.

Quick start

  1. Make an HTTPS request to https://adcode.nabzclan.vip/api.php.
  2. Provide the long URL via url query string or form body.
  3. Parse the JSON response for shorturl and stats.
  4. (Optional) add pass to require a password on redirect.

Endpoints

GET – JSON

Quick tests, browser friendly.

https://adcode.nabzclan.vip/api.php?url=https://example.com

GET – Plain text

Add &skipjson to receive only the short URL.

https://adcode.nabzclan.vip/api.php?url=https://example.com&skipjson

POST – Form

Recommended for apps & scripts.

curl -sk -X POST -d 'url=https://nabzclan.vip/forums/' https://adcode.nabzclan.vip/api.php

GET – Stats JSON

Fetch metadata for an existing code (no destination leakage).

https://adcode.nabzclan.vip/stats-api.php?id=abc123

Parameters

Parameter Type Required Description
url string Yes Destination to shorten. Supports http, https, and direct .plist manifest links.
pass string No Optional password that forces visitors through the password gate.
skipjson flag No When present, the API returns only the short URL as plain text (useful for shell pipelines).

Sample requests

GET query string:

curl "https://adcode.nabzclan.vip/api.php?url=https://example.com"

POST form payload:

curl -sk -X POST \ -d 'url=https://nabzclan.vip/forums/' \ https://adcode.nabzclan.vip/api.php

POST + password gate:

curl -sk -X POST \ -d 'url=https://example.com&pass=secret123' \ https://adcode.nabzclan.vip/api.php

Response

{ "longurl": "https://example.com", "shorturl": "https://adcode.nabzclan.vip/abc123", "stats": "https://adcode.nabzclan.vip/stats.php?id=abc123" }

Plain-text mode (&skipjson) returns only https://adcode.nabzclan.vip/abc123.

Stats API response

Call https://adcode.nabzclan.vip/stats-api.php?id={code} to query hit counts and timestamps for an existing short link.

{ "code": "abc123", "hits": 42, "created_at": "2025-01-15 13:22:10", "created_ago": "3 days ago", "last_visit": "2025-01-18 09:01:00", "last_visit_ago": "4 hours ago", "protected": false, "stats_url": "https://adcode.nabzclan.vip/stats.php?id=abc123" }

Use this when you need analytics for a code without exposing the original destination.

iOS manifests & itms-services

Paste either of the following—Adcode auto-detects and builds the install splash screen:

  • Direct plist URL: https://your-cdn.com/app/manifest.plist
  • Classic itms-services link: itms-services://?action=download-manifest&url=https%3A%2F%2F...

Example POST with plist:

curl -sk -X POST \ -d 'url=https://cdn.example.com/app/manifest.plist' \ https://adcode.nabzclan.vip/api.php
The API normalizes plist links into itms-services behind the scenes and includes app metadata on the splash page.

Error handling

Status Description
{"error":"Invalid URL"} Malformed or unsupported scheme. Ensure you include http(s)://.
{"error":"Your URL is blank"} No value detected in the request.
{"error":"You cannot shorten URLs from this domain"} Loop prevention when attempting to shorten the Adcode base domain.

Best practices

  • Always send requests over HTTPS.
  • Cache successful responses; repeated requests for the same URL return the original short link.
  • Use the stats URL to embed analytics in your own dashboards.
  • By calling the API you agree to the NabzClan Terms of Service and policies.