Sand AISand AI MAGI-2MAGI-2 jest teraz na SandBase: wideo 1080p z natywnym dźwiękiemWypróbuj teraz

Instagram Shortcode Extractor

Dokumentacja API
https://api.sandbase.ai/v1/api/instagram/v3/extract-shortcode

Extracts and returns the unique shortcode identifier from an Instagram post, reel, or TV URL. Requires the full target post URL as input.

Cena
$0.002USD / wywołanie
Metoda
POST
Odpowiedź
JSON
Parametry
1 wymaganych · 0 opcjonalnych

Playground

Wejście
Full Instagram post URL
WyjścieGotowe

Twój wynik pojawi się tutaj

Uzupełnij dane wejściowe, a następnie kliknij Uruchom.

README API

Instagram Shortcode Extractor API

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=.

Use cases

  • Normalize links pasted by users before calling post APIs.
  • Deduplicate the same post shared with different tracking parameters.

Request

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.

Parameters

NameTypeRequiredDescription
urlstringYesFull Instagram post URL

Example response

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/"
}

Response fields

FieldMeaning
shortcodeThe 11-character post shortcode.
urlThe link you sent.

Notes

  • The shortcode is the media ID in base 64; convert it with Shortcode to Media ID.
  • This only parses the link; it does not check that the post exists.

Pricing

$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.

Odkryj więcej

Powiązane APIs

Wszystkie APIs
APICenaOdpowiedź
Instagram$0.002 za wywołanieJSON
Instagram$0.008 za wywołanieJSON
Instagram$0.008 za wywołanieJSON
Instagram$0.008 za wywołanieJSON
Instagram$0.008 za wywołanieJSON
Instagram$0.008 za wywołanieJSON

Przewodniki:Instagram API cost: official limits and per-call pricesBest Instagram API in 2026: Pricing Compared

Pytania

FAQ

Jak używać API Instagram Shortcode Extractor?

Wyślij żądanie POST do https://api.sandbase.ai/v1/api/instagram/v3/extract-shortcode z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.

Ile kosztuje API Instagram Shortcode Extractor?

$0.002 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.

Jakie parametry przyjmuje API Instagram Shortcode Extractor?

Wymagane: url (string). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.

Co zwraca API Instagram Shortcode Extractor?

Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.

Czy potrzebuję konta deweloperskiego Instagram lub klucza API?

Nie. Instagram Shortcode Extractor działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API Instagram.