GoInsta. Make Goinsta Great Again!
Unofficial Instagram API for Golang
Versioning
Goinsta used gopkg.in as versioning control. Stable new API is the version v2.0. You can get it using:
go get -u -v gopkg.in/ahmdrz/goinsta.v2
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
Export
and Import
functions. - 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.
New Version !
We are working on a new object-oriented API. Try it and tell us your suggestions. See https://github.com/ahmdrz/goinsta/blob/master/CONTRIBUTING.md
If you want to use the old version you can found it in v1 branch or using gopkg.in/ahmdrz/goinsta.v1/
Sorry for breaking dependences :(. You can use this command in your project folder to update old master branch to v1.
for i in `grep -r ahmdrz ./ | awk '{split($0, a, ":"); print a[1]}'`; do sed -i 's/github\.com\/ahmdrz\/goinsta/gopkg\.in\/ahmdrz\/goinsta\.v1/g' $i; done
Package installation
go get -u -v gopkg.in/ahmdrz/goinsta.v2
CLI installation
go get -u -v gopkg.in/ahmdrz/goinsta.v2
go install gopkg.in/ahmdrz/goinsta.v2/goinsta
Example
package main
import (
"fmt"
"gopkg.in/ahmdrz/goinsta.v2"
)
func main() {
insta := goinsta.New("USERNAME", "PASSWORD")
if err := insta.Login(); err != nil {
fmt.Println(err)
return
}
insta.Export("~/.goinsta")
...
}
Projects using Goinsta
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.
Donate
Ahmdrz
Bitcoin: 1KjcfrBPJtM4MfBSGTqpC6RcoEW1KBh15X
Mester
Bitcoin: 37aogDJYBFkdSJTWG7TgcpgNweGHPCy1Ks
Schema
The objects of the following schema can point to other objects defined below.
Instagram
- Account: Personal information and account interactions.
- Followers
- Following
- Feed
- Stories
- Liked
- Saved
- Tags
- Blocked
- Profiles: User interaction.
- Blocked
- Get user using ID
- Get user using Username
- Media:
- Items
- Comments # Comments and Comment are different.
- User
- Comment(s) # Slice of Comment
- Likes
- Likers
- Item
- Items # If it is a carousel.
- Search:
- Location
- Username
- Tags
- Location Deprecated
- Facebook
- Activity:
- Hashtag: Hashtag allows user to search using hashtags.
- Stories
- Media # By default hashtag contains Medias in the structure