Story class represents a single Instagram story or highlight item and gives you direct access to its media URL, type, and engagement data. JxInsta lets you retrieve stories from three places: the authenticated account’s feed, a specific user’s active story reel, or a user’s saved highlights. The Mobile and Web modules share an identical Story field surface, so the same code for reading fields works in both.
Feed stories
UsegetStories() on the Mobile client or getFeedStories() on the Web client to retrieve the batch of story reels currently visible in the authenticated account’s home feed. Both methods return List<Story[]> where each Story[] is the set of story items belonging to one user.
- Mobile
- Web
The Web client populates
userID but does not always populate username on story items returned from the feed. Use userID as the reliable identifier when iterating feed results on the Web module.User stories
getStory() on a Profile object retrieves the currently active story items for that specific account. It returns List<Story> — a flat list of all story frames, not grouped into reels.
getStory() behaves the same way on both the Mobile and Web modules. On Mobile it returns an empty list when the user has no active stories; on Web it returns null. Always guard against both.
Highlights
getHighlights() on a Profile object returns List<Story> containing the items from all of the account’s saved highlight collections.
Downloading story media
download_url is always populated and points directly to the CDN-hosted media file. For video stories the URL comes from the first entry in video_versions; for image stories it comes from the first candidate in image_versions2. The URL does not require authentication to fetch.
Liking a story (Mobile only)
On the Mobile module,Story implements Likable, which exposes like() and dislike(). These methods are not available on the Web module.
Story field reference
The following fields are present onStory objects from both the Mobile and Web modules.
| Field | Type | Description |
|---|---|---|
storyId | String | The unique identifier of the story item. |
userID | String | The numeric ID (pk) of the account that posted the story. |
username | String | The username of the poster. May not be populated on Web feed responses. |
download_url | String | Direct CDN URL to the story media (image or video). |
is_video | boolean | true if the story item is a video, false if it is an image. |
duration | int | Video length in seconds. -1 for image stories or when not available. |
views | int | Viewer count. -1 when Instagram does not return this value. |
likes | int | Like count. Mobile sets this to 1 if the authenticated user has liked it. Web returns -1 (not tracked). |