Sand AISand AI MAGI-2MAGI-2 теперь на SandBase: видео 1080p с нативным звукомПопробовать сейчас

Instagram Shortcode Extractor

Документация 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.

Цена
$0.002USD / вызов
Метод
POST
Ответ
JSON
Параметры
1 обязательных · 0 необязательных

Песочница

Ввод
Full Instagram post URL
ВыходГотово

Ваш результат появится здесь

Заполните входные данные, затем нажмите «Запустить».

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.

Посмотреть больше

Связанные APIs

Все APIs
APIЦенаОтвет
Instagram$0.002 за запросJSON
Instagram$0.008 за запросJSON
Instagram$0.008 за запросJSON
Instagram$0.008 за запросJSON
Instagram$0.008 за запросJSON
Instagram$0.008 за запросJSON

Руководства:Instagram API cost: official limits and per-call pricesBest Instagram API in 2026: Pricing Compared

Вопросы

FAQ

Как использовать API Instagram Shortcode Extractor?

Отправьте POST-запрос на https://api.sandbase.ai/v1/api/instagram/v3/extract-shortcode, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.

Сколько стоит API Instagram Shortcode Extractor?

$0.002 за вызов, списывается с баланса SandBase. Оплата взимается только за сделанные вызовы; подписка не требуется.

Какие параметры принимает API Instagram Shortcode Extractor?

Обязательные: url (string). В таблице Parameters и в Playground на этой странице перечислены все поля.

Что возвращает API Instagram Shortcode Extractor?

JSON-ответ, возвращаемый в том же HTTP-запросе (синхронно). В README на этой странице приведен пример ответа.

Нужен ли мне аккаунт разработчика Instagram или API key?

Нет. Instagram Shortcode Extractor работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API Instagram.