Get followers of a user. Page size 10-100; use cursor for more pages. $0.10/1000 users.
package main
import(
"context"
"os"
xapiscraper "github.com/twexapi-dev/x-api-scraper-go"
"github.com/twexapi-dev/x-api-scraper-go/optionalnullable"
"github.com/twexapi-dev/x-api-scraper-go/models/components"
"log"
)
func main() {
ctx := context.Background()
s := xapiscraper.New(
xapiscraper.WithSecurity(os.Getenv("X_API_SCRAPER_BEARER_AUTH")),
)
res, err := s.Users.Followers.List(ctx, components.FollowersFollowingV3Query{
Username: "elonmusk",
Count: optionalnullable.From(xapiscraper.Pointer[int64](20)),
Cursor: optionalnullable.From(xapiscraper.Pointer("1870681402093130182|2076960004551737340")),
})
if err != nil {
log.Fatal(err)
}
if res.VerifiedFollowersResponse != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
components.FollowersFollowingV3Query | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UsersFollowersListResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.HTTPValidationError | 422 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
Get blue-verified followers of a user. Page size 10-100; use cursor for more pages. $0.10/1000 users.
package main
import(
"context"
"os"
xapiscraper "github.com/twexapi-dev/x-api-scraper-go"
"github.com/twexapi-dev/x-api-scraper-go/optionalnullable"
"github.com/twexapi-dev/x-api-scraper-go/models/components"
"log"
)
func main() {
ctx := context.Background()
s := xapiscraper.New(
xapiscraper.WithSecurity(os.Getenv("X_API_SCRAPER_BEARER_AUTH")),
)
res, err := s.Users.Followers.Verified(ctx, components.FollowersFollowingV3Query{
Username: "elonmusk",
Count: optionalnullable.From(xapiscraper.Pointer[int64](20)),
Cursor: optionalnullable.From(xapiscraper.Pointer("1870681402093130182|2076960004551737340")),
})
if err != nil {
log.Fatal(err)
}
if res.VerifiedFollowersResponse != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
components.FollowersFollowingV3Query | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UsersFollowersVerifiedResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.HTTPValidationError | 422 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |