Skip to content
/ goinsta Public
forked from Davincible/goinsta

Unofficial Instagram API written in Golang (v2021)

License

Notifications You must be signed in to change notification settings

elli56/goinsta

 
 

Repository files navigation

Fork

This repository has been forked from ahmdrz/goinsta. As the maintainer of this repositry has been absend the last few months, and the code in the repository was based on a 2 year old instagram app version, since which a lot has changed, I have taken the courtesy to build upon his great framework and update the code to be compatible with apk v195.0.0.31.123 (July 6, 2021). After migrating the endpoints and adding new ones, there are are few breaking changes. You can check the full walkthrough documentation in the wiki, and looking at the code to further understand how it works is encouraged.

Golang + Instagram Private API

goinsta logo

Unofficial Instagram API for Golang

Build Status GoDoc Go Report Card Gitter chat

Features

  • HTTP2 by default. Goinsta uses HTTP2 client enhancing performance.
  • Object independency. Can handle multiple instagram accounts.
  • Like Instagram mobile application. Goinsta is very similar to Instagram official application.
  • Simple. Goinsta is made by lazy programmers!
  • Backup methods. You can use Exportand Importfunctions.
  • Security. Your password is only required to login. After login your password is deleted.
  • No External Dependencies. GoInsta will not use any Go packages outside of the standard library. goinsta now uses chromedp as headless browser driver to solve challanges and checkpoints.

Package installation

go get -u github.com/Davincible/goinsta/v3@latest

Example

package main

import (
	"fmt"

	"github.com/Davincible/goinsta/v3"
)

func main() {  
  insta := goinsta.New("USERNAME", "PASSWORD")
  
  // Only call Login the first time you login. Next time import your config
  err := insta.Login()
  if err != nil {
          panic(err)
  }

  // Export your configuration
  // after exporting you can use Import function instead of New function.
  // insta, err := goinsta.Import("~/.goinsta")
  // it's useful when you want use goinsta repeatedly.
  // Export is deffered because every run insta should be exported at the end of the run
  //   as the header cookies change constantly.
  defer insta.Export("~/.goinsta")

  ...
}

For the full documentation, check the wiki, or run go doc -all.

Legal

This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by Instagram or any of its affiliates or subsidiaries. This is an independent and unofficial API. Use at your own risk.

Versioning

Goinsta used gopkg.in as versioning control. Stable new API is the version v3.0. You can get it using:

$ go get -u -v github.com/Davincible/goinsta/v3

Or

If you have GO111MODULE=on

$ go get -u github.com/Davincible/goinsta/v3

About

Unofficial Instagram API written in Golang (v2021)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%