ÂĢ back to orsi.me

instagram-without-api

Instagram Without APIs

Instagram Scraping (@users and #tags), no credentials required


A simple library to get unlimited instagram public pictures by (@users and #tags) without api, without credentials (just token from cookies), just Instagram Scraping (with cookie and image data in base64).

You can get the latest pictures/information from an account, a tag or a single picture/information by id.

🛕 Cool Project Example sniffagram

🎮 Demo / Example

⚖ī¸ Licensed under MIT

🤓 Author @orsifrancesco

☕ Coffes are welcome (in particular if you appreciate the project or you plan to contact me)


- don't share your cookie code with anyone!!! it is the same of your credentials

follow this steps

🛕 Cool Project Example

sniffagram

🎮 Demo / Example

Although 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).
To solve this problem you will get all the URLs and all the images data in base64.
You can easily show the image data on your project with the following snippets of code:

<img src="data:image/jpg;base64, hereYourBase64String.."/>
.example { background-image: url('data:image/jpg;base64, hereYourBase64String..'); }

Check https://orsifrancesco.github.io/instagram-without-api/how-to-show-base64-images.html for Base64 example.

🕹ī¸ JSON outputs

output example for fetchByTag or fetch on https://github.com/orsifrancesco/instagram-without-api/blob/master/instagram-cache.json

[
  {
    "id": "2696840872190940431",
    "time": 1635708506,
    "imageUrl": "https://scontent-lcy1-1.cdninstagram.com/v/t51.2885-15/e35/p1080x1080/249938862_1214260935751176_32...",
    "likes": 18,
    "comments": 0,
    "link": "https://www.instagram.com/p/CVtGnwashUP/",
    "text": "#helloworld #domain #check",
    "image": "/9j/4AAQSkZJRgABAQAAAQABAAD/7QB8UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGA.............",
    "location": "Liverpool Cathedral",
    "carousel": [
      {
        "imageUrl": "https://scontent.cdninstagram.com/v/t51.2885-15/314902884_370847155226583_8126....",
        "image": "/9j/4AAQSsasaakZJRgABAQAAAQABAAD/7QB8UGhvdGQAAAAAAGA............."
      },
      {
        "imageUrl": "https://scontent.cdninstagram.com/v/t51.2885-15/314674373_678631710324...",
        "image": "/9j/4AAQSkZJRgABAQAAAQdG9zaG9wIDMuMAA4QklNBAQAAAAAAGA............."
      }
    ]
  },
  {
    "id": "2654027113529608497",
    "time": 1630604708,
    "imageUrl": "https://scontent-lcy1-1.cdninstagram.com/v/t51.2885-15/e35/p1080x1080/241221239_8640769...",
    "videoUrl": "https://scontent-lcy1-1.cdninstagram.com/v/t51.2885-15/e35/p1080x1080/241221239_8640769...",
    "likes": 38,
    "comments": 0,
    "link": "https://www.instagram.com/p/CTU_5keMAkx/",
    "text": "#london #uk #unitedkingdom #tube #underground #overground #sunrise #morning #morningvibes #sky #metro #line #prospective",
    "image": "/9j/4AAQSkZJRgABAQAAAQABAAD/7QB8UGhvdG9zaG9wIDMuMAA4Qkl...........",
    "location": "Eiffle Tower, Paris France."
  }
]

output example for fetchByIdUrl or fetchById

[
  {
    "id": "289855367...",
    "width": 1385,
    "height": 1731,
    "imageUrl": "https:\/\/scontent-lhr8-1.cdnin...",
    "time": 1659754546,
    "topLikers": [
        "franko"
    ],
    "likes": 32,
    "commentCount": 2,
    "comments": [
      {
        "time": 1659756069,
        "text": "This is a comment...",
        "user": {
          "username": "test",
          "fullName": "DearTest",
          "imageUrl": "https:\/\/scontent-lhr8-1.cdninstagram.com..."
        }
      }
    ],
    "link": "https:\/\/www.instagram.com\/p\/Cgczi6qMuh1\/",
    "text": "If you know it, you know it...",
    "user": {
      "username": "orsifrancesco",
      "fullName": "Frank",
      "imageUrl": "https:\/\/scontent-lhr8-1.cd..."
    },
    "image": "\/9j\/4AAQSkZJR....Q=="
  }
]

⚖ī¸ License

Licensed under MIT

☕ About

Any feedback to @orsifrancesco and coffees are welcome :)

npm Node.js PHP