{"id":13697307,"url":"https://github.com/orsifrancesco/instagram-without-api-node","last_synced_at":"2025-07-19T03:04:47.322Z","repository":{"id":50608807,"uuid":"519609940","full_name":"orsifrancesco/instagram-without-api-node","owner":"orsifrancesco","description":"A simple Node.js code to get unlimited instagram public pictures by every user without api, without credentials.","archived":false,"fork":false,"pushed_at":"2024-02-18T22:26:48.000Z","size":1310,"stargazers_count":68,"open_issues_count":5,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T20:20:25.120Z","etag":null,"topics":["instagram","instagram-api","instagram-scraper","node","node-js","nodejs","scraper","scraping","scraping-api","without-api"],"latest_commit_sha":null,"homepage":"https://orsi.me/instagram-without-api/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orsifrancesco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-30T20:03:12.000Z","updated_at":"2025-02-07T07:06:46.000Z","dependencies_parsed_at":"2024-11-13T01:41:28.054Z","dependency_job_id":null,"html_url":"https://github.com/orsifrancesco/instagram-without-api-node","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"3beceb1c7c718f87a0c9f9465149a385953278b3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/orsifrancesco/instagram-without-api-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsifrancesco%2Finstagram-without-api-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsifrancesco%2Finstagram-without-api-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsifrancesco%2Finstagram-without-api-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsifrancesco%2Finstagram-without-api-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orsifrancesco","download_url":"https://codeload.github.com/orsifrancesco/instagram-without-api-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsifrancesco%2Finstagram-without-api-node/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265879175,"owners_count":23843079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["instagram","instagram-api","instagram-scraper","node","node-js","nodejs","scraper","scraping","scraping-api","without-api"],"created_at":"2024-08-02T18:00:55.553Z","updated_at":"2025-07-19T03:04:47.302Z","avatar_url":"https://github.com/orsifrancesco.png","language":"JavaScript","funding_links":["https://www.paypal.com/donate/?business=5EL4L2LDYVH96","https://paypal.me/orsifrancesco)--"],"categories":["JavaScript"],"sub_categories":[],"readme":"# ⛔️ DEPRECATED\n\nInstagram moved the pictures array to another endpoint (with more than one redirect) making harder to catch images server side without scrapers like [Puppeter](https://pptr.dev/).\n\nAlthought is not perfect \u003ca href=\"https://orsi.me/sniffagram\" rel=\"sniffagram\"\u003e\u003cimg style=\"vertical-align: middle\" alt=\"sniffagram\" width=\"100\" src=\"https://user-images.githubusercontent.com/6490641/232155875-ce2ea2ec-eeb5-4bcc-9af7-8c8d82887420.svg\" /\u003e\u003c/a\u003e (as a temporary solution) works.\n\nMaybe in the future I will share a new version, but judging by the many demands without any kind of gratitude and collaboration from the community, I have lost the desire.\n\n\u003cbr/\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/6490641/182688224-3730f63d-0428-49d6-a909-5a31fc3a38b9.png\" width=\"128\" height=\"128\" alt=\"instagram-without-api\" /\u003e\n\u003c/p\u003e\n\u003ch2 align=\"center\"\u003eInstagram Without APIs\u003c/h2\u003e\n\u003ch3 align=\"center\"\u003eInstagram Scraping \u003cstrong\u003e(@users and #tags)\u003c/strong\u003e in April 2023, no credentials required\u003c/h3\u003e\n\n\u003cbr/\u003e\n\nThis is a Node.js library, are you looking for the same in PHP? go to https://orsi.me/instagram-without-api/.\n\nA simple Node.js code to get **unlimited instagram public pictures** by **every user** without api, **without credentials** (just token from cookies), just Instagram Scraping in 2023 (with cookie and image data in base64).\n\nYou can get the latest pictures/information from an account or a single picture/information by id.\n\n### [📦 npm link](https://www.npmjs.com/package/instagram-without-api-node)\n### [🛕 Cool Project Example](https://orsi.me/sniffagram) \u003ca href=\"https://orsi.me/sniffagram\" rel=\"sniffagram\"\u003e\u003cimg style=\"vertical-align: middle\" alt=\"sniffagram\" width=\"100\" src=\"https://user-images.githubusercontent.com/6490641/232155875-ce2ea2ec-eeb5-4bcc-9af7-8c8d82887420.svg\" /\u003e\u003c/a\u003e\n### [🎮 Demo / Example](https://orsifrancesco.github.io/instagram-without-api/how-to-show-base64-images.html)\n### ⚖️ Licensed under MIT\n### 🤓 Author [@orsifrancesco](https://twitter.com/orsifrancesco)\n### ☕ [Coffees are welcome](https://www.paypal.com/donate/?business=5EL4L2LDYVH96) \u003csmall\u003e(in particular if you appreciate the project or you plan to contact me)\u003c/small\u003e\n\u003c!--### ☕ [Offer me a coffee](https://paypal.me/orsifrancesco)--\u003e\n\n\u003chr/\u003e\n\n## 📦 Installation\n\n```bash\nnpm i instagram-without-api-node\n\n# download the file https://github.com/orsifrancesco/instagram-without-api-node/blob/master/test.js\n# add your cookie, user-agent and x-ig-app-id following the next step \"How to get Instagram Cookie\"\n\nnode test.js\n```\n\n## 🍪 How to get Instagram Cookie\n\n- Login to Instagram\n- Go to your https://instagram/yourUsername\n- Open your Browser Console (on Chrome just pressing F12)\n  1. Select the \"Network\" tab\n  2. Search and click on \"timeline/\" file; if it is empty just refresh the page\n  3. Select \"Headers\" bar\n  4. Be sure the file is Request Method \"POST\" (if it is \"OPTIONS\" search the other \"timeline/\" file in the list)\n  5. Scroll down and select \"Request Headers\" tab\n  6. Copy all the code after the word \"cookie: \" and paste it on `_cookie` variable\n  7. Copy all the code after the word \"user-agent: \" and paste it on `_userAgent` variable\n  8. Copy all the code after the word \"x-ig-app-id: \" and paste it on `_xIgAppId` variable\n```diff\n- don't share your cookie code with anyone!!! it is the same of your credentials\n```\n- That's it, enjoy :)\n\n![follow this steps](https://user-images.githubusercontent.com/6490641/181632823-42fb2308-4c3f-421a-848a-58cefcf98915.png \"follow this steps\")\n\n## 💻 Images Base64\nAlthough you can get the URLs of the images, Instagram doesn't give you the possibility to include and showing those images on your projects (they will be automatically blocked from their servers).\\\nTo solve this problem you will get all the URLs and all the images data in base64.\\\nYou can easily show the image data on your project with the following snippets of code:\n\n```html\n\u003cimg src=\"data:image/jpg;base64, hereYourBase64String..\"/\u003e\n```\n```css\n.example { background-image: url('data:image/jpg;base64, hereYourBase64String..'); }\n```\n\nCheck https://orsifrancesco.github.io/instagram-without-api/how-to-show-base64-images.html for Base64 example.\n\n## 🛕 Cool Project Example\n\u003ca href=\"https://orsi.me/sniffagram\" rel=\"sniffagram\"\u003e![sniffagram](https://user-images.githubusercontent.com/6490641/232155875-ce2ea2ec-eeb5-4bcc-9af7-8c8d82887420.svg \"sniffagram\")\u003c/a\u003e\n\n## 🎮 Demo / Example\nexample on https://github.com/orsifrancesco/instagram-without-api-node/blob/master/test.js\n\n```js\nconst { iwaTag, iwa, iwaId, iwaIdUrl } = require('instagram-without-api-node');\n\nconst _cookie = 'mid=Ywj....hFLUdjNT55f0\"'      // \u003c!-- required!! please get your cookie from your browser console (6)\nconst _userAgent = 'Mozilla/5.0.../537.36'      // \u003c!-- required!! please get your user-agent from your browser console (7)\nconst _xIgAppId = '93661974...'                 // \u003c!-- required!! please get your x-ig-app-id from your browser console (8)\n\nasync function fetch() {\n\n    // get the latest 12 feeds from a tag (example https://instagram.com/explore/tags/love)\n\n    const responseIwaTag = await iwaTag({\n\n        group: 'recent',                        // \u003c!-- \"recent\" images or \"top\" images; \"recent\" is by default \n        base64images: true,                     // \u003c!-- optional, but without you will be not able to save images.. it increases the size of the json file\n        base64imagesCarousel: false,            // \u003c!-- optional but not recommended, it increases the size of the json file\n        base64videos: false,                    // \u003c!-- optional but not recommended, it increases the size of the json file\n\n        headers: {\n            'cookie': _cookie,\n            'user-agent': _userAgent,\n            'x-ig-app-id': _xIgAppId\n        },\n\n        maxImages: 2,                           // \u003c!-- optional, 12 is the max number\n        file: \"instagram-cache-bytag.json\",     // \u003c!-- optional, instagram-cache.json is by default\n        pretty: true,                           // \u003c!-- optional, prettyfy json true/false\n        time: 3600,                             // \u003c!-- optional, reload contents after 3600 seconds by default\n\n        id: \"love\"                              // \u003c!-- id is required\n\n    })\n\n    console.log({ responseIwaTag });\n\n\n\n    // get the latest 12 feeds from an account (example https://www.instagram.com/orsifrancesco/)\n\n    const responseIwa = await iwa({\n\n        base64images: true,                     // \u003c!-- optional, but without you will be not able to save images.. it increases the size of the json file\n        base64imagesCarousel: false,            // \u003c!-- optional but not recommended, it increases the size of the json file\n        base64videos: false,                    // \u003c!-- optional but not recommended, it increases the size of the json file\n\n        headers: {\n            'cookie': _cookie,\n            'user-agent': _userAgent,\n            'x-ig-app-id': _xIgAppId\n        },\n\n        maxImages: 2,                           // \u003c!-- optional, 12 is the max number\n        file: \"instagram-cache.json\",           // \u003c!-- optional, instagram-cache.json is by default\n        pretty: true,                           // \u003c!-- optional, prettyfy json true/false\n        time: 3600,                             // \u003c!-- optional, reload contents after 3600 seconds by default\n\n        id: \"orsifrancesco\"                     // \u003c!-- id is required\n\n    })\n\n    console.log({ responseIwa });\n\n\n\n    // get picture and info from instagram id url (example https://www.instagram.com/p/Cgczi6qMuh1/)\n\n    const responseIwaIdUrl = await iwaIdUrl({\n\n        headers: {\n            'cookie': _cookie,\n            'user-agent': _userAgent,\n            'x-ig-app-id': _xIgAppId\n        },\n\n        base64images: false,                    // \u003c!-- optional, but without it, you will be not able to store/show images\n        file: \"instagram-cache-byidurl.json\",   // \u003c!-- optional, instagram-cache.json is by default\n        pretty: true,                           // \u003c!-- optional, prettyfy json true/false\n        time: 3600,                             // \u003c!-- optional, reload contents after 3600 seconds by default\n\n        id: \"Cgczi6qMuh1\"                       // \u003c!-- id is required\n\n    })\n\n    console.log({ responseIwaIdUrl });\n\n\n\n    // get picture and info from instagram id (2890411760684296309 is the id of https://www.instagram.com/p/Cgczi6qMuh1/)\n\n    const responseIwaId = await iwaId({\n\n        base64images: true,                     // \u003c!-- optional, but without you will be not able to save images.. it increases the size of the json file\n        base64videos: false,                    // \u003c!-- optional but not recommended, it increases the size of the json file\n\n        headers: {\n            'cookie': _cookie,\n            'user-agent': _userAgent,\n            'x-ig-app-id': _xIgAppId\n        },\n\n        file: \"instagram-cache-byid.json\",      // \u003c!-- optional, instagram-cache.json is by default\n        pretty: true,                           // \u003c!-- optional, prettyfy json true/false\n        time: 3600,                             // \u003c!-- optional, reload contents after 3600 seconds by default\n\n        id: \"2890411760684296309\"               // \u003c!-- id is required\n\n    })\n\n    console.log({ responseIwaId });\n\n}\nfetch()\n```\n\n## 🕹️ JSON outputs\noutput example for `iwaTag` or `iwa` function on https://github.com/orsifrancesco/instagram-without-api/blob/master/instagram-cache.json\n\n```json\n[\n  {\n    \"id\": \"2696840872190940431\",\n    \"time\": 1635708506,\n    \"imageUrl\": \"https://scontent-lcy1-1.cdninstagram.com/v/t51.2885-15/e35/p1080x1080/249938862_1214260935751176_32...\",\n    \"likes\": 18,\n    \"comments\": 0,\n    \"link\": \"https://www.instagram.com/p/CVtGnwashUP/\",\n    \"text\": \"#helloworld #domain #check\",\n    \"image\": \"/9j/4AAQSkZJRgABAQAAAQABAAD/7QB8UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGA.............\",\n    \"location\": \"Liverpool Cathedral\",\n    \"carousel\": [\n      {\n        \"imageUrl\": \"https://scontent.cdninstagram.com/v/t51.2885-15/314902884_370847155226583_8126....\",\n        \"image\": \"/9j/4AAQSsasaakZJRgABAQAAAQABAAD/7QB8UGhvdGQAAAAAAGA.............\"\n      },\n      {\n        \"imageUrl\": \"https://scontent.cdninstagram.com/v/t51.2885-15/314674373_678631710324...\",\n        \"image\": \"/9j/4AAQSkZJRgABAQAAAQdG9zaG9wIDMuMAA4QklNBAQAAAAAAGA.............\"\n      }\n    ]\n  },\n  {\n    \"id\": \"2654027113529608497\",\n    \"time\": 1630604708,\n    \"imageUrl\": \"https://scontent-lcy1-1.cdninstagram.com/v/t51.2885-15/e35/p1080x1080/241221239_8640769...\",\n    \"videoUrl\": \"https://scontent-lcy1-1.cdninstagram.com/v/t51.2885-15/e35/p1080x1080/241221239_8640769...\",\n    \"likes\": 38,\n    \"comments\": 0,\n    \"link\": \"https://www.instagram.com/p/CTU_5keMAkx/\",\n    \"text\": \"#london #uk #unitedkingdom #tube #underground #overground #sunrise #morning #morningvibes #sky #metro #line #prospective\",\n    \"image\": \"/9j/4AAQSkZJRgABAQAAAQABAAD/7QB8UGhvdG9zaG9wIDMuMAA4Qkl...........\",\n    \"location\": \"Eiffle Tower, Paris France.\"\n  }\n]\n```\n\noutput example for `iwaId` or `iwaIdUrl` functions\n```json\n[\n  {\n    \"id\": \"289855367...\",\n    \"width\": 1385,\n    \"height\": 1731,\n    \"imageUrl\": \"https:\\/\\/scontent-lhr8-1.cdnin...\",\n    \"time\": 1659754546,\n    \"topLikers\": [\n        \"franko\"\n    ],\n    \"likes\": 32,\n    \"commentCount\": 2,\n    \"comments\": [\n      {\n        \"time\": 1659756069,\n        \"text\": \"This is a comment...\",\n        \"user\": {\n          \"username\": \"test\",\n          \"fullName\": \"DearTest\",\n          \"imageUrl\": \"https:\\/\\/scontent-lhr8-1.cdninstagram.com...\"\n        }\n      }\n    ],\n    \"link\": \"https:\\/\\/www.instagram.com\\/p\\/Cgczi6qMuh1\\/\",\n    \"text\": \"If you know it, you know it...\",\n    \"user\": {\n      \"username\": \"orsifrancesco\",\n      \"fullName\": \"Frank\",\n      \"imageUrl\": \"https:\\/\\/scontent-lhr8-1.cd...\"\n    },\n    \"image\": \"\\/9j\\/4AAQSkZJR....Q==\"\n  }\n]\n```\n\n## ⚖️ License\n\nLicensed under MIT\n\n\n## ☕ About\n\nAny feedback to [@orsifrancesco](https://twitter.com/orsifrancesco) and [coffees](https://www.paypal.com/donate/?business=5EL4L2LDYVH96) are welcome :) ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsifrancesco%2Finstagram-without-api-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forsifrancesco%2Finstagram-without-api-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsifrancesco%2Finstagram-without-api-node/lists"}