urlstringobbligatorio
Full Instagram post URL
https://api.sandbase.ai/v1/api/instagram/v3/extract-shortcodeExtracts and returns the unique shortcode identifier from an Instagram post, reel, or TV URL. Requires the full target post URL as input.
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
Extract the shortcode from an Instagram post, reel or TV link. Instagram links take the forms instagram.com/p/<shortcode>/, instagram.com/reel/<shortcode>/ and instagram.com/tv/<shortcode>/, often with tracking query strings such as ?igsh=.
curl -X POST "https://api.sandbase.ai/v1/api/instagram/v3/extract-shortcode" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.instagram.com/p/DUajw4YkorV/"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Full Instagram post URL |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"shortcode": "DUajw4YkorV",
"url": "https://www.instagram.com/p/DUajw4YkorV/"
}
| Field | Meaning |
|---|---|
shortcode | The 11-character post shortcode. |
url | The link you sent. |
$0.002 per successful call. Failed calls, including lookups whose target does not exist, are not charged. It is included in the daily free quota of each organization.
Inizia a costruire
Endpoint API della piattaforma con autenticazione unificata e tracciamento dell'utilizzo.
curl -X POST "https://api.sandbase.ai/v1/api/instagram/v3/extract-shortcode" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.instagram.com/p/DUajw4YkorV/"
}'Imposta la tua SandBase API key nell'ambiente del server. Le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la tua key sul server. Non esporla nel codice del browser.
urlstringobbligatorioFull Instagram post URL
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
Nessuna risposta salvata è stata pubblicata. Esegui l'API in Playground per ispezionarne la risposta.
Esplora altro
| API | Prezzo | Risposta |
|---|---|---|
Instagram Shortcode ExtractorQuesta API Instagram | $0.002 per chiamata | JSON |
Instagram | $0.008 per chiamata | JSON |
Instagram | $0.008 per chiamata | JSON |
Instagram | $0.008 per chiamata | JSON |
Instagram | $0.008 per chiamata | JSON |
Instagram | $0.008 per chiamata | JSON |
Guide:Instagram API cost: official limits and per-call pricesBest Instagram API in 2026: Pricing Compared
Domande
Invia una richiesta POST a https://api.sandbase.ai/v1/api/instagram/v3/extract-shortcode con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.
$0.002 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Richiesti: url (string). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.
Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.
No. Instagram Shortcode Extractor funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API Instagram.