{"openapi":"3.1.0","info":{"title":"IGramAPI API","description":"\nInstagram data as a simple JSON API: profiles, posts, reels, stories, highlights, comments, audio,\nsearch and hashtags, plus ready-to-download media files.\n\n## Authentication\nCreate an API key in your dashboard and send it with every request:\n\n```\nAuthorization: Bearer igk_xxxxxxxxxxxxxxxx\n```\n\n(`X-API-Key: igk_...` also works.) Never put a key in client-side code.\n\n## Credits and limits\nEvery successful call costs credits (profile data 1, comments 2, stories 3, ...). Failed calls are free.\nEach response carries `X-Credits-Remaining`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. When you\nexceed your per-minute limit you get **429** with `Retry-After`; when your monthly credits run out, **402**.\n\n## Errors\nEvery error has the same shape and a stable `code` you can branch on:\n\n```json\n{\"error\": {\"code\": \"quota_exceeded\", \"message\": \"...\", \"request_id\": \"req_8c2f9d4e1a7b3c50\"}}\n```\n\nQuote the `request_id` when contacting support.\n","version":"1.0.0"},"servers":[{"url":"https://api.igramapi.com"}],"paths":{"/v1/profiles/{username}":{"get":{"tags":["Profiles"],"summary":"Profile details","description":"Name, bio, verification, follower/following/post counts and the profile picture.","operationId":"get_profile_v1_profiles__username__get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Instagram username, with or without @.","title":"Username"},"description":"Instagram username, with or without @."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/profiles/{username}/picture":{"get":{"tags":["Profiles"],"summary":"Profile picture","description":"The largest profile picture available (`is_hd` tells you whether it is full resolution).","operationId":"get_picture_v1_profiles__username__picture_get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Instagram username, with or without @.","title":"Username"},"description":"Instagram username, with or without @."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PictureResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/profiles/{username}/posts":{"get":{"tags":["Profiles"],"summary":"Posts","description":"The latest posts (photos, videos, carousels) with download links. Paginate with `cursor`.","operationId":"get_posts_v1_profiles__username__posts_get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Instagram username, with or without @.","title":"Username"},"description":"Instagram username, with or without @."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"`page.end_cursor` from the previous response.","title":"Cursor"},"description":"`page.end_cursor` from the previous response."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostsResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/profiles/{username}/reels":{"get":{"tags":["Profiles"],"summary":"Reels","description":"The latest reels with download links. Paginate with `cursor`.","operationId":"get_reels_v1_profiles__username__reels_get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Instagram username, with or without @.","title":"Username"},"description":"Instagram username, with or without @."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"`page.end_cursor` from the previous response.","title":"Cursor"},"description":"`page.end_cursor` from the previous response."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostsResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/profiles/{username}/stories":{"get":{"tags":["Profiles"],"summary":"Stories","description":"Active 24-hour stories. An account with no active story returns `count: 0`. Paid plans only.","operationId":"get_stories_v1_profiles__username__stories_get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Instagram username, with or without @.","title":"Username"},"description":"Instagram username, with or without @."},{"name":"story_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Return only this story.","title":"Story Id"},"description":"Return only this story."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoriesResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/profiles/{username}/highlights":{"get":{"tags":["Profiles"],"summary":"Highlights","description":"The highlight albums of a profile. Fetch an album's media with `GET /v1/highlights`. Paid plans only.","operationId":"get_highlights_v1_profiles__username__highlights_get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Instagram username, with or without @.","title":"Username"},"description":"Instagram username, with or without @."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HighlightsResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/highlights":{"get":{"tags":["Profiles"],"summary":"Highlight media","description":"All media of one highlight. Paid plans only.","operationId":"get_highlight_v1_highlights_get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"url","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Highlight URL or /s/ share link.","title":"Url"},"description":"Highlight URL or /s/ share link."},{"name":"id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Numeric highlight id.","title":"Id"},"description":"Numeric highlight id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HighlightMediaResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/media":{"get":{"tags":["Media"],"summary":"Reel, post or carousel","description":"Metadata and download URLs, including every quality of a video (`formats`).","operationId":"get_media_v1_media_get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"url","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Post or reel URL.","title":"Url"},"description":"Post or reel URL."},{"name":"shortcode","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"description":"Post shortcode.","title":"Shortcode"},"description":"Post shortcode."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/media/{shortcode}":{"get":{"tags":["Media"],"summary":"Reel, post or carousel","operationId":"get_media_by_shortcode_v1_media__shortcode__get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"shortcode","in":"path","required":true,"schema":{"type":"string","minLength":5,"maxLength":60,"title":"Shortcode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/media/{shortcode}/comments":{"get":{"tags":["Media"],"summary":"Comments","description":"Public comments of a post or reel. Paginate with `cursor`.","operationId":"get_comments_v1_media__shortcode__comments_get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"shortcode","in":"path","required":true,"schema":{"type":"string","minLength":5,"maxLength":60,"title":"Shortcode"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"`page.end_cursor` from the previous response.","title":"Cursor"},"description":"`page.end_cursor` from the previous response."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Items per page (1-50).","default":24,"title":"Limit"},"description":"Items per page (1-50)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentsResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/audio":{"get":{"tags":["Discovery"],"summary":"Audio track by URL","operationId":"get_audio_v1_audio_get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1000,"description":"Audio page URL or a reel URL.","title":"Url"},"description":"Audio page URL or a reel URL."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/audio/{audio_id}":{"get":{"tags":["Discovery"],"summary":"Audio track","description":"Title, artist, cover art, a direct audio download URL and sample reels.","operationId":"get_audio_by_id_v1_audio__audio_id__get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"audio_id","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":40,"description":"Numeric audio id.","title":"Audio Id"},"description":"Numeric audio id."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/search":{"get":{"tags":["Discovery"],"summary":"Search","description":"Autocomplete across users, hashtags and places.","operationId":"search_v1_search_get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Name, username or hashtag.","title":"Q"},"description":"Name, username or hashtag."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Items per page (1-50).","default":20,"title":"Limit"},"description":"Items per page (1-50)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/hashtags/{tag}":{"get":{"tags":["Discovery"],"summary":"Hashtag feed","description":"Popular posts and reels for a hashtag. Paginate with `cursor`. Paid plans only.","operationId":"get_hashtag_v1_hashtags__tag__get","security":[{"ApiKey":[]},{"ApiKeyHeader":[]}],"parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Hashtag, with or without #.","title":"Tag"},"description":"Hashtag, with or without #."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"`page.end_cursor` from the previous response.","title":"Cursor"},"description":"`page.end_cursor` from the previous response."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Items per page (1-50).","default":12,"title":"Limit"},"description":"Items per page (1-50)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HashtagResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/downloads":{"post":{"tags":["Downloads"],"summary":"Prepare a media file for download","description":"Fetches the file from Instagram, stores it in our CDN-backed storage, and returns a time-limited link.\n\nPass a CDN URL taken from another endpoint's response. Download the file from `download_url`\n(no API key needed). Identical requests reuse the stored copy, so they are fast.","operationId":"create_download_v1_downloads_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly credits exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Endpoint requires a paid plan, or the target is private.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The profile, post or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Per-minute rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Instagram could not be reached or blocked the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKey":[]},{"ApiKeyHeader":[]}]}},"/v1/auth/register":{"post":{"tags":["Authentication"],"summary":"Create an account","description":"Creates a free account, emails a verification link, and signs the new user in.","operationId":"register_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/login":{"post":{"tags":["Authentication"],"summary":"Sign in","operationId":"login_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/refresh":{"post":{"tags":["Authentication"],"summary":"Exchange a refresh token","description":"Refresh tokens are single-use: each call returns a new pair and invalidates the old refresh token.","operationId":"refresh_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPair"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/logout":{"post":{"tags":["Authentication"],"summary":"Sign out","operationId":"logout_v1_auth_logout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/verify-email":{"post":{"tags":["Authentication"],"summary":"Confirm an email address","operationId":"verify_email_v1_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/resend-verification":{"post":{"tags":["Authentication"],"summary":"Send the verification email again","operationId":"resend_verification_v1_auth_resend_verification_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]}]}},"/v1/auth/forgot-password":{"post":{"tags":["Authentication"],"summary":"Request a password reset email","description":"Always answers 202, whether or not the address has an account.","operationId":"forgot_password_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/reset-password":{"post":{"tags":["Authentication"],"summary":"Choose a new password","operationId":"reset_password_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account":{"get":{"tags":["Account"],"summary":"Current account","operationId":"get_account_v1_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"401":{"description":"Sign in required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]}]},"patch":{"tags":["Account"],"summary":"Update the profile","operationId":"update_account_v1_account_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"401":{"description":"Sign in required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AccessToken":[]}]}},"/v1/account/change-password":{"post":{"tags":["Account"],"summary":"Change the password","description":"Signs the account out everywhere: sign in again with the new password.","operationId":"change_password_v1_account_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"401":{"description":"Sign in required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AccessToken":[]}]}},"/v1/account/api-keys":{"get":{"tags":["Account"],"summary":"List API keys","operationId":"list_api_keys_v1_account_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyOut"},"type":"array","title":"Response List Api Keys V1 Account Api Keys Get"}}}},"401":{"description":"Sign in required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"AccessToken":[]}]},"post":{"tags":["Account"],"summary":"Create an API key","description":"The full key appears in this response only. Store it now: it cannot be shown again.","operationId":"create_api_key_v1_account_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"401":{"description":"Sign in required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AccessToken":[]}]}},"/v1/account/api-keys/{key_id}/rotate":{"post":{"tags":["Account"],"summary":"Replace an API key","description":"Revokes the key immediately and issues a new one with the same name.","operationId":"rotate_api_key_v1_account_api_keys__key_id__rotate_post","security":[{"AccessToken":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"401":{"description":"Sign in required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/api-keys/{key_id}":{"delete":{"tags":["Account"],"summary":"Revoke an API key","operationId":"revoke_api_key_v1_account_api_keys__key_id__delete","security":[{"AccessToken":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Sign in required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/usage":{"get":{"tags":["Account"],"summary":"Credits and request history","operationId":"usage_v1_account_usage_get","security":[{"AccessToken":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"How many days of per-endpoint history to return.","default":30,"title":"Days"},"description":"How many days of per-endpoint history to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageReport"}}}},"401":{"description":"Sign in required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/plans":{"get":{"tags":["Billing"],"summary":"Available plans","description":"Public. Credits renew monthly; each endpoint's credit cost is listed in the API reference.","operationId":"list_plans_v1_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanOut"},"type":"array","title":"Response List Plans V1 Plans Get"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["Billing"],"summary":"Buy a plan: monthly subscription or one-time pass","description":"Two ways to pay, same price:\n\n* `mode: \"subscription\"` renews every month until cancelled. Open Razorpay Checkout with `subscription_id`.\n* `mode: \"one_time\"` is a single 30-day pass that does not renew. Open Razorpay Checkout with `order_id` and\n  `amount_paise`, then send the success callback's values to `POST /v1/billing/verify-payment`.\n\nEither way the plan switches on as soon as Razorpay confirms the payment.","operationId":"checkout_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AccessToken":[]}]}},"/v1/billing/verify-payment":{"post":{"tags":["Billing"],"summary":"Confirm a one-time payment","description":"Call this from Razorpay Checkout's success handler. It activates the plan immediately; the payment webhook\nwould do the same a moment later, and doing both is harmless.","operationId":"verify_payment_v1_billing_verify_payment_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyPaymentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AccessToken":[]}]}},"/v1/billing/subscription":{"get":{"tags":["Billing"],"summary":"Current plan and how it is paid","operationId":"get_subscription_v1_billing_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}}},"security":[{"AccessToken":[]}]}},"/v1/billing/cancel":{"post":{"tags":["Billing"],"summary":"Stop a subscription from renewing","description":"Stops renewal. You keep the paid plan until the period you already paid for ends.","operationId":"cancel_subscription_v1_billing_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}}},"security":[{"AccessToken":[]}]}}},"components":{"schemas":{"ApiKeyCreated":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"last4":{"type":"string","title":"Last4"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"key":{"type":"string","title":"Key","description":"The full key. It is shown once and cannot be retrieved later."}},"type":"object","required":["id","name","prefix","last4","created_at","last_used_at","expires_at","key"],"title":"ApiKeyCreated"},"ApiKeyOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"last4":{"type":"string","title":"Last4"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["id","name","prefix","last4","created_at","last_used_at","expires_at"],"title":"ApiKeyOut"},"Audio":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"artist":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artist"}},"type":"object","title":"Audio"},"AudioArtist":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"profile_picture_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Url"},"is_verified":{"type":"boolean","title":"Is Verified","default":false}},"type":"object","title":"AudioArtist"},"AudioResponse":{"properties":{"audio_id":{"type":"string","title":"Audio Id"},"audio_type":{"type":"string","title":"Audio Type","description":"`licensed_music` or `original_sound`."},"title":{"type":"string","title":"Title"},"artist":{"$ref":"#/components/schemas/AudioArtist"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"cover_artwork_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Artwork Url"},"download_url":{"type":"string","title":"Download Url"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"clips_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Clips Count"},"formatted_clips_count":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Formatted Clips Count"},"is_trending":{"type":"boolean","title":"Is Trending","default":false},"canonical_url":{"type":"string","title":"Canonical Url"},"sample_reels":{"items":{"$ref":"#/components/schemas/AudioSampleReel"},"type":"array","title":"Sample Reels","default":[]},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["audio_id","audio_type","title","artist","download_url","canonical_url"],"title":"AudioResponse"},"AudioSampleReel":{"properties":{"shortcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shortcode"},"media_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Id"},"thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"play_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Play Count"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"}},"type":"object","title":"AudioSampleReel"},"AuthResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserOut"},"tokens":{"$ref":"#/components/schemas/TokenPair"}},"type":"object","required":["user","tokens"],"title":"AuthResponse"},"Author":{"properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"profile_picture_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Url"}},"type":"object","title":"Author"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","maxLength":128,"minLength":1,"title":"Current Password"},"new_password":{"type":"string","maxLength":128,"minLength":10,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"CheckoutRequest":{"properties":{"plan":{"type":"string","maxLength":32,"minLength":1,"title":"Plan"},"mode":{"type":"string","enum":["subscription","one_time"],"title":"Mode","description":"`subscription` renews monthly until cancelled; `one_time` is a single 30-day pass.","default":"subscription"}},"type":"object","required":["plan"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"mode":{"type":"string","enum":["subscription","one_time"],"title":"Mode"},"plan":{"type":"string","title":"Plan"},"razorpay_key_id":{"type":"string","title":"Razorpay Key Id"},"subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Id"},"order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Id"},"amount_paise":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Paise"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},"type":"object","required":["mode","plan","razorpay_key_id"],"title":"CheckoutResponse","description":"Open Razorpay Checkout with `razorpay_key_id` and either `subscription_id` or `order_id`."},"Comment":{"properties":{"id":{"type":"string","title":"Id"},"text":{"type":"string","title":"Text"},"created_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created At","description":"Unix timestamp."},"like_count":{"type":"integer","title":"Like Count","default":0},"reply_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reply Count"},"parent_comment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Comment Id"},"author":{"$ref":"#/components/schemas/CommentAuthor"},"gif_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gif Url"}},"type":"object","required":["id","text","author"],"title":"Comment"},"CommentAuthor":{"properties":{"id":{"type":"string","title":"Id"},"username":{"type":"string","title":"Username"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"profile_picture_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Url"},"is_verified":{"type":"boolean","title":"Is Verified","default":false}},"type":"object","required":["id","username"],"title":"CommentAuthor"},"CommentsResponse":{"properties":{"shortcode":{"type":"string","title":"Shortcode"},"media_id":{"type":"string","title":"Media Id"},"total_comments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Comments"},"items":{"items":{"$ref":"#/components/schemas/Comment"},"type":"array","title":"Items"},"page":{"$ref":"#/components/schemas/Page"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["shortcode","media_id","items","page"],"title":"CommentsResponse"},"CreateApiKeyRequest":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name","default":"Default"}},"type":"object","title":"CreateApiKeyRequest"},"DownloadLink":{"properties":{"type":{"type":"string","title":"Type","description":"`video` or `image`."},"url":{"type":"string","title":"Url","description":"Instagram CDN URL. Expires; see `POST /v1/downloads` for a stable file."},"thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail"},"quality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality"}},"type":"object","required":["type","url"],"title":"DownloadLink"},"DownloadRequest":{"properties":{"type":{"type":"string","enum":["video","audio","image"],"title":"Type","description":"`video`: an MP4 (add `audio_url` to merge a video-only DASH quality with its sound). `audio`: an MP3 extracted from `url` (a video). `image`: a photo or thumbnail."},"url":{"type":"string","maxLength":4096,"title":"Url","description":"Instagram CDN URL taken from another endpoint's response."},"audio_url":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Audio Url","description":"Audio stream to merge into `url`; set when the chosen format lists an `audio_url`."},"filename":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Filename","description":"Download file name (extension optional)."}},"type":"object","required":["type","url"],"title":"DownloadRequest"},"DownloadResponse":{"properties":{"download_url":{"type":"string","title":"Download Url","description":"Presigned link; fetch it directly, no API key needed."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"When the link stops working. Request a new one after this."},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["download_url","expires_at","filename","content_type","size_bytes"],"title":"DownloadResponse"},"ErrorBody":{"properties":{"code":{"type":"string","title":"Code","examples":["quota_exceeded"]},"message":{"type":"string","title":"Message"},"request_id":{"type":"string","title":"Request Id","examples":["req_8c2f9d4e1a7b3c50"]},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["code","message","request_id"],"title":"ErrorBody"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"type":"object","required":["error"],"title":"ErrorResponse"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HashtagMedia":{"properties":{"shortcode":{"type":"string","title":"Shortcode"},"media_type":{"type":"string","title":"Media Type"},"thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"permalink":{"type":"string","title":"Permalink"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"},"like_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Like Count"},"play_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Play Count"}},"type":"object","required":["shortcode","media_type","permalink"],"title":"HashtagMedia"},"HashtagResponse":{"properties":{"hashtag":{"type":"string","title":"Hashtag"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"items":{"items":{"$ref":"#/components/schemas/HashtagMedia"},"type":"array","title":"Items"},"page":{"$ref":"#/components/schemas/Page"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["hashtag","items","page"],"title":"HashtagResponse"},"HighlightAlbum":{"properties":{"highlight_id":{"type":"string","title":"Highlight Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"cover_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Image Url"},"media_count":{"type":"integer","title":"Media Count","default":0}},"type":"object","required":["highlight_id"],"title":"HighlightAlbum"},"HighlightMediaResponse":{"properties":{"highlight_id":{"type":"string","title":"Highlight Id"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/StoryItem"},"type":"array","title":"Items"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["highlight_id","count","items"],"title":"HighlightMediaResponse"},"HighlightsResponse":{"properties":{"username":{"type":"string","title":"Username"},"count":{"type":"integer","title":"Count"},"albums":{"items":{"$ref":"#/components/schemas/HighlightAlbum"},"type":"array","title":"Albums"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["username","count","albums"],"title":"HighlightsResponse"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"MediaResponse":{"properties":{"shortcode":{"type":"string","title":"Shortcode"},"media_type":{"type":"string","title":"Media Type","description":"`video`, `image` or `carousel`."},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail"},"slides":{"items":{"$ref":"#/components/schemas/MediaSlide"},"type":"array","title":"Slides","default":[]},"formats":{"items":{"$ref":"#/components/schemas/VideoFormat"},"type":"array","title":"Formats","description":"Quality choices, best first (single videos only).","default":[]},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"author":{"$ref":"#/components/schemas/Author"},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration"},"taken_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Taken At","description":"Unix timestamp."},"play_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Play Count"},"like_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Like Count"},"comment_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Comment Count"},"reshare_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reshare Count"},"audio":{"anyOf":[{"$ref":"#/components/schemas/Audio"},{"type":"null"}]},"is_paid_partnership":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Paid Partnership"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["shortcode","media_type","author"],"title":"MediaResponse"},"MediaSlide":{"properties":{"type":{"type":"string","title":"Type"},"url":{"type":"string","title":"Url"},"thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail"}},"type":"object","required":["type","url"],"title":"MediaSlide"},"Message":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"Message"},"Page":{"properties":{"has_next_page":{"type":"boolean","title":"Has Next Page","default":false},"end_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Cursor","description":"Pass as `cursor` to get the next page."}},"type":"object","title":"Page"},"PictureResponse":{"properties":{"username":{"type":"string","title":"Username"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"is_hd":{"type":"boolean","title":"Is Hd","default":false},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["username"],"title":"PictureResponse"},"PlanOut":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"monthly_credits":{"type":"integer","title":"Monthly Credits"},"rate_limit_per_minute":{"type":"integer","title":"Rate Limit Per Minute"},"max_api_keys":{"type":"integer","title":"Max Api Keys"},"allow_premium":{"type":"boolean","title":"Allow Premium"},"price_inr":{"type":"number","title":"Price Inr","description":"Price in INR for one month, as a subscription or a one-time 30-day pass."},"subscription_available":{"type":"boolean","title":"Subscription Available","default":false},"one_time_available":{"type":"boolean","title":"One Time Available","default":false}},"type":"object","required":["code","name","monthly_credits","rate_limit_per_minute","max_api_keys","allow_premium","price_inr"],"title":"PlanOut"},"PostSummary":{"properties":{"shortcode":{"type":"string","title":"Shortcode"},"media_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Id"},"type":{"type":"string","title":"Type"},"thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"like_count":{"type":"integer","title":"Like Count","default":0},"comment_count":{"type":"integer","title":"Comment Count","default":0},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration"},"taken_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Taken At"},"like_and_view_counts_hidden":{"type":"boolean","title":"Like And View Counts Hidden","default":false},"downloads":{"items":{"$ref":"#/components/schemas/DownloadLink"},"type":"array","title":"Downloads","default":[]}},"type":"object","required":["shortcode","type"],"title":"PostSummary"},"PostsResponse":{"properties":{"username":{"type":"string","title":"Username"},"items":{"items":{"$ref":"#/components/schemas/PostSummary"},"type":"array","title":"Items"},"page":{"$ref":"#/components/schemas/Page"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["username","items","page"],"title":"PostsResponse"},"Profile":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"username":{"type":"string","title":"Username"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"biography":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Biography"},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Url"},"profile_picture_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture Url"},"is_hd_picture":{"type":"boolean","title":"Is Hd Picture","default":false},"is_private":{"type":"boolean","title":"Is Private","default":false},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"followers":{"type":"integer","title":"Followers","default":0},"following":{"type":"integer","title":"Following","default":0},"posts_count":{"type":"integer","title":"Posts Count","default":0}},"type":"object","required":["username"],"title":"Profile"},"ProfileResponse":{"properties":{"profile":{"$ref":"#/components/schemas/Profile"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["profile"],"title":"ProfileResponse"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","maxLength":200,"minLength":20,"title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":10,"title":"Password"},"full_name":{"type":"string","maxLength":120,"title":"Full Name","default":""}},"type":"object","required":["email","password"],"title":"RegisterRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","maxLength":2048,"minLength":20,"title":"Token"},"new_password":{"type":"string","maxLength":128,"minLength":10,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"SearchHashtag":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"media_count":{"type":"integer","title":"Media Count","default":0},"subtitle":{"type":"string","title":"Subtitle","default":""},"profile_picture_url":{"type":"string","title":"Profile Picture Url","default":""}},"type":"object","required":["name"],"title":"SearchHashtag"},"SearchPlace":{"properties":{"pk":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pk"},"name":{"type":"string","title":"Name"},"address":{"type":"string","title":"Address","default":""},"city":{"type":"string","title":"City","default":""},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"}},"type":"object","required":["name"],"title":"SearchPlace"},"SearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"users":{"items":{"$ref":"#/components/schemas/SearchUser"},"type":"array","title":"Users"},"hashtags":{"items":{"$ref":"#/components/schemas/SearchHashtag"},"type":"array","title":"Hashtags"},"places":{"items":{"$ref":"#/components/schemas/SearchPlace"},"type":"array","title":"Places"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["query","users","hashtags","places"],"title":"SearchResponse"},"SearchUser":{"properties":{"pk":{"type":"string","title":"Pk"},"username":{"type":"string","title":"Username"},"full_name":{"type":"string","title":"Full Name","default":""},"profile_picture_url":{"type":"string","title":"Profile Picture Url","default":""},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"is_private":{"type":"boolean","title":"Is Private","default":false},"follower_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Follower Count"},"social_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Social Context"},"has_story":{"type":"boolean","title":"Has Story","default":false}},"type":"object","required":["pk","username"],"title":"SearchUser"},"StoriesResponse":{"properties":{"username":{"type":"string","title":"Username"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/StoryItem"},"type":"array","title":"Items"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["username","count","items"],"title":"StoriesResponse"},"StoryItem":{"properties":{"story_id":{"type":"string","title":"Story Id"},"type":{"type":"string","title":"Type"},"media_url":{"type":"string","title":"Media Url"},"thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail"},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration"},"taken_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Taken At"},"expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires At"},"has_audio":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Audio"}},"type":"object","required":["story_id","type","media_url"],"title":"StoryItem"},"SubscriptionOut":{"properties":{"plan":{"type":"string","title":"Plan"},"mode":{"type":"string","enum":["none","subscription","one_time","manual"],"title":"Mode","default":"none"},"status":{"type":"string","title":"Status"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_cycle_end":{"type":"boolean","title":"Cancel At Cycle End"}},"type":"object","required":["plan","status","current_period_end","cancel_at_cycle_end"],"title":"SubscriptionOut"},"TokenPair":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","description":"Access token lifetime in seconds."}},"type":"object","required":["access_token","refresh_token","expires_in"],"title":"TokenPair"},"TokenRequest":{"properties":{"token":{"type":"string","maxLength":2048,"minLength":20,"title":"Token"}},"type":"object","required":["token"],"title":"TokenRequest"},"UpdateProfileRequest":{"properties":{"full_name":{"type":"string","maxLength":120,"title":"Full Name"}},"type":"object","required":["full_name"],"title":"UpdateProfileRequest"},"UsageDay":{"properties":{"day":{"type":"string","format":"date","title":"Day"},"endpoint":{"type":"string","title":"Endpoint"},"requests":{"type":"integer","title":"Requests"},"credits":{"type":"integer","title":"Credits"},"errors":{"type":"integer","title":"Errors"}},"type":"object","required":["day","endpoint","requests","credits","errors"],"title":"UsageDay"},"UsageReport":{"properties":{"summary":{"$ref":"#/components/schemas/UsageSummary"},"daily":{"items":{"$ref":"#/components/schemas/UsageDay"},"type":"array","title":"Daily"}},"type":"object","required":["summary","daily"],"title":"UsageReport"},"UsageSummary":{"properties":{"plan":{"type":"string","title":"Plan"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"credits_limit":{"type":"integer","title":"Credits Limit"},"credits_used":{"type":"integer","title":"Credits Used"},"credits_remaining":{"type":"integer","title":"Credits Remaining"},"rate_limit_per_minute":{"type":"integer","title":"Rate Limit Per Minute"}},"type":"object","required":["plan","period_start","period_end","credits_limit","credits_used","credits_remaining","rate_limit_per_minute"],"title":"UsageSummary"},"UserOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"email_verified":{"type":"boolean","title":"Email Verified"},"plan":{"type":"string","title":"Plan"},"is_admin":{"type":"boolean","title":"Is Admin"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","full_name","email_verified","plan","is_admin","created_at"],"title":"UserOut"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyPaymentRequest":{"properties":{"razorpay_order_id":{"type":"string","maxLength":64,"minLength":5,"title":"Razorpay Order Id"},"razorpay_payment_id":{"type":"string","maxLength":64,"minLength":5,"title":"Razorpay Payment Id"},"razorpay_signature":{"type":"string","maxLength":128,"minLength":10,"title":"Razorpay Signature"}},"type":"object","required":["razorpay_order_id","razorpay_payment_id","razorpay_signature"],"title":"VerifyPaymentRequest","description":"The three values Razorpay Checkout hands to its success callback for a one-time order."},"VideoFormat":{"properties":{"id":{"type":"string","title":"Id"},"quality":{"type":"string","title":"Quality","description":"Shown to users: \"1080p\", \"720p\", \"Standard\"."},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"bitrate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bitrate","description":"Video bits per second."},"codec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codec"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes","description":"File size once downloaded (exact or estimated)."},"url":{"type":"string","title":"Url"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url","description":"Set when `url` is a video-only stream. Pass both to `POST /v1/downloads` to merge them."}},"type":"object","required":["id","quality","url"],"title":"VideoFormat"}},"securitySchemes":{"ApiKey":{"type":"http","description":"Your API key: `Authorization: Bearer igk_...`","scheme":"bearer"},"ApiKeyHeader":{"type":"apiKey","description":"Alternative to the Bearer header.","in":"header","name":"X-API-Key"},"AccessToken":{"type":"http","description":"Dashboard session token from /v1/auth/login.","scheme":"bearer"}}},"tags":[{"name":"Profiles","description":"Profile details, posts, reels, stories and highlights."},{"name":"Media","description":"Single reels, posts and carousels; comments."},{"name":"Discovery","description":"Search, hashtags and audio."},{"name":"Downloads","description":"Prepare files for download from our storage."},{"name":"Authentication","description":"Sign up and sign in to the dashboard API."},{"name":"Account","description":"Profile, API keys and usage."},{"name":"Billing","description":"Plans and subscriptions."}]}