MCPcopy Index your code
hub / github.com/Vorkytaka/instagram-go-scraper

github.com/Vorkytaka/instagram-go-scraper @v0.2.03

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.03 ↗ · + Follow
41 symbols 107 edges 6 files 16 documented · 39%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Instagram Go Scraper

GoDoc Build Status

Instagram Scraper for Golang.

A package that helps you with requesting to Instagram without a key.

Installation:

Install:

$ go get -u github.com/SolidlSnake/instagram-go-scraper/instagram

Import:

import "github.com/SolidlSnake/instagram-go-scraper/instagram"

List of functions:

After import you can use following functions:

// Get account info
account, err := instagram.GetAccountByUsername("username")

// Get media info
media, err := instagram.GetMediaByCode("code")
media, err := instagram.GetMediaByURL("https://instagram.com/p/code")

// Get slice of account media
media, err := instagram.GetAccountMedia("username", limit)
// or slice of all account media
media, err := instagram.GetAllAccountMedia("username")

// Get slice of location last media
media, err := instagram.GetLocationMedia("location_id", limit)
// Get array[9] of location top media
media, err := instagram.GetLocationTopMedia("location_id")

// Get location info
location, err := instagram.GetLocationByID("location_id")

// Get slice of tag last media
media, err := instagram.GetTagMedia("tag", limit)
// Get array[9] of tag top media
media, err := instagram.GetLocationTopMedia("tag")

// Search for users (return slice of Accounts)
users, err := instagram.SearchForUsers("username")

You'll get err != nil if request return 404 or if there a parsing error.

About media updates:

Media can have one of 3 types: * TypeImage * TypeVideo * TypeCarousel

From v0.2.03 media has MediaList field for collection of media.

If media is carousel, then there will be a list of all media.

If media is image or video, then there will be only one media, but also, for backward compatibility, media url will be in media.MediaURL field.

Update data:

You can update media by call Update method:

media, err := instagram.GetMediaByCode("code")
err := media.Update()
if err != nil {
    // media didn't update
}

Same with account:

account, err := instagram.GetAccountByUsername("username")
err := account.Update()
if err != nil {

}

Core symbols most depended-on inside this repo

GetAccountByUsername
called by 6
instagram/instagram.go
GetMediaByCode
called by 5
instagram/instagram.go
getJSONFromURL
called by 5
instagram/instagram.go
getDataFromURL
called by 5
instagram/instagram.go
getFromSearchMediaList
called by 4
instagram/media.go
GetAccountMedia
called by 2
instagram/instagram.go
GetAllAccountMedia
called by 2
instagram/instagram.go
Update
called by 1
instagram/account.go

Shape

Function 35
Struct 4
Method 2

Languages

Go100%

Modules by API surface

instagram/instagram_test.go16 symbols
instagram/instagram.go13 symbols
instagram/media.go6 symbols
instagram/account.go4 symbols
instagram/location.go2 symbols

For agents

$ claude mcp add instagram-go-scraper \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page