Superface

Social Media Followers

social-media/followers@1.2.0
1 provider

Get Followers

Retrieve a paginated list of followers for a social media profile.

Input
Profile ID
Page
Result
Previous page
Next page
Followers
Rate limit

1.Choose a provider

2.Use GetFollowers with mock in your code

Below instructions are for our Node.js SDK. Use OneService for other languages.
npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

// You can manage tokens here: https://superface.ai/insights
const sdk = new SuperfaceClient({ sdkAuthToken: '<< Login to get your token >>' });

async function run() {
  // Load the profile
  const profile = await sdk.getProfile('social-media/followers@1.2.0');

  // Use the profile
  const result = await profile
    .getUseCase('GetFollowers')
    .perform({
      profileId: '429238130'
    }, {
      provider: 'mock'
    });

  // Handle the result
  try {
    const data = result.unwrap();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

run();

Structure details

Input (object)

profileId
Identifier of a profile to retrieve followers from. May be optional with some providers.
page
Pagination cursor (obtained from `previousPage` or `nextPage`).

Example

{
  "profileId": "429238130"
}

Result (object)

previousPage
Previous page cursor.
nextPage
Next page cursor.
followers
List of followers.
id
Profile identifier of the follower.
username
Username of the follower.
imageUrl
Follower profile image url.
followersCount
How many followers does the follower have
followingCount
How many profiles is the follower following
postsCount
How many posts has the follower published
rateLimit
Rate limit details.
bucket
Different parts of API may have different rate limits. Bucket identifies to which part of API the rate limits apply.
totalRequests
Total requests available in the time window.
remainingRequests
Remaining requests available in the time window.
remainingRequestsPercentage
Remaining requests available in the time window in percents.
resetTimestamp
Timestamp when the rate limits will reset (in Unix Timestamp format). Available only for providers without rolling rate limit window.

Example

{
  "followers": [
    {
      "id": "1466796521412771840",
      "username": "superface_test",
      "imageUrl": "https://pbs.twimg.com/profile_images/1478302204306067462/5BEbrnPO_normal.jpg",
      "followersCount": 42,
      "followingCount": 3,
      "postsCount": 321
    }
  ],
  "nextPage": "QVFIUjc2Y01oQ3F1bHk5WHNzNVVuS2ZAMSEtpdkxmbC1FV09XcGNmTUc4ZAkhrMlBPU19LYkM0dFY4",
  "rateLimit": {
    "bucket": "get-users-followed-lists",
    "totalRequests": 15,
    "remainingRequests": 12,
    "remainingRequestsPercentage": 80,
    "resetTimestamp": 1643713585
  }
}

Implementation details

Provider
mock
Use case
GetFollowers
Author
@superface
Source
Verified