If you look at the response, you see that it simply means that there's no caption (for example, look at number 3)
Try something like this:
for (var i = 0; i < 20; i++) {
$("#pics").append("<a target='_blank' href='" + data.data[i].link + "'><img src='" + data.data[i].images.low_resolution.url + "'></img></a>");
if (data.data[i].caption === null) {
$("#text").append("<p>No caption</p>");
} else {
$("#text").append("<p>"+data.data[i].caption.text+"</p>");
}
}
Answer from Poootaatoooo on Stack OverflowGitHub
github.com › dilame › instagram-private-api › issues › 966
Caption is null when uploading · Issue #966 · dilame/instagram-private-api
November 2, 2019 - (async() => { await loginIG(); result = await ig.publish.photo({ 'file': createIMG(), 'caption': 'hello hello' }); console.log(result); })(); // just for good measure, i'm including my login code as well async function loginIG() { log.status('loginIG: logging in'); let userFeed; let firstPageItems; profile = getFromStuff('.profile'); const cookiesFile = getFromStuff('.cookies'); if (cookiesFile !== undefined) { await ig.state.deserializeCookieJar(JSON.stringify(cookiesFile)); } ig.state.generateDevice(username); if (profile !== undefined) { try { log.status('loginIG: test: getting user feed');
Author dilame
Top answer 1 of 2
1
If you look at the response, you see that it simply means that there's no caption (for example, look at number 3)
Try something like this:
for (var i = 0; i < 20; i++) {
$("#pics").append("<a target='_blank' href='" + data.data[i].link + "'><img src='" + data.data[i].images.low_resolution.url + "'></img></a>");
if (data.data[i].caption === null) {
$("#text").append("<p>No caption</p>");
} else {
$("#text").append("<p>"+data.data[i].caption.text+"</p>");
}
}
2 of 2
0
The reason is in some of the caption is null like data[3] ,data[4] in the response. Do a null check before retrieving the text which is inside caption object
for (var i = 0; i < 20; i++) {
if (res.data[i].caption !== null) {
console.log(res.data[i].caption.text);
}
}
Videos
01:07
What Does Null Comment Mean on Instagram? Why Does it Say Null? ...
The Duffy-null phenotype is a genetic variant tied to ancestry ...
Behind @dustboxdustbox with @r0bbymeehan
01:27
Null As a Username on Instagram Problem Solve | Instagram Username ...
TikTok
tiktok.com › discover › what-does-null-mean-on-instagram-post
What Does Null Mean on Instagram Post | TikTok
May 11, 2026 - #Instagram #значение ... сообщения, Instagram фраза (null), как понять (null) в Instagram ... ﹡💙💐₊˚ ୨ ♡ ୧ ˚₊ what is “(null)” mesn in captions 🧢! ⚡︎‧₊˚ 𝗜𝗕 :: lost it ꒷₊˚⤜ 0.0k !🐷☁︎︎* ࿐‧₊˚ ...
Fha
erpstaging.fha.gov.ng › home › what is null on instagram? + how to fix it!
What is Null on Instagram? + How to Fix It!
September 1, 2025 - Instead of allowing the post with a corrupted caption, the system might reject the caption altogether, storing a ‘null’ value in the corresponding database field. This action ensures that the platform’s rendering engine does not encounter issues due to the invalid characters, preserving the display integrity of the content. ... Instagram imposes length restrictions on various content fields, such as usernames, bios, and captions.
TikTok
tiktok.com › discover › why-are-my-messages-saying-null-on-instagram
Why Are My Messages Saying Null on Instagram | TikTok
3 weeks ago - (You can do that by heading to the reels editor and choosing the downward arrow in the menu) #instagramreels #reelsglitch #instagramtips #contentcreatortips How to Fix Instagram Reels Text Glitch. Spot and fix the common Instagram reels text glitch with these easy steps. Break up text blocks, rearrange lines, and avoid too much text on a frame. Find the full guide in the caption!
YouTube
youtube.com › watch
What Does Null Mean on Instagram? - Everyday-Networking - YouTube
What Does Null Mean on Instagram? Have you ever come across the term "null" on Instagram and found yourself puzzled about its meaning? In this informative vi...
Published February 16, 2025
TikTok
tiktok.com › discover › what-does-null-mean-on-instagram-message
What Does Null Mean on Instagram Message | TikTok
April 5, 2026 - Learn how to manage unread messages on Instagram and what the moon symbol means. Find out how to mark messages as unread and more! #instagram #instagramtips. unread messages on instagram, mark as unread instagram, how to unread message in instagram, instagram unseen message, what does the moon mean on instagram ... What does (null) means?
Instagram
instagram.com › null
Instagram
Welcome back to Instagram. Sign in to see what your friends, family and interests have been capturing and sharing around the world.
GitHub
github.com › dilame › instagram-private-api › issues › 685
Caption of uploaded photo is set to null · Issue #685 · dilame/instagram-private-api
March 25, 2019 - Hello, I noticed that there is some limit for adding / deleting photos - which remove caption from posting images. Is there any smart way to handle that? I could make some kind of sleep after getti...
Author dilame