Email me if you need anything: [email protected]

Demo

https://youtu.be/ttUEPdwMnk8?si=iYHZfkB2vVxilf7O

Tiktok Profile

Example:

async function scrapeTiktokProfile(handle) {
  try {
    const res = await axios({
      method: "POST",
      url: "<https://api.scrapecreators.com/tiktok/profile>",
      headers: {
        'x-api-key': process.env.API_TOKEN
      },
      data: {
        handle
      },
    });
    return res.data;
  } catch (e) {
    console.log("error", e.message);
  }
}

Tiktok Videos of a user

async function scrapeTiktokUserVideos(handle) {
  try {
    const res = await axios({
      method: "POST",
      url: "<https://api.scrapecreators.com/tiktok/profile-videos>",
      headers: {
	      'x-api-token': process.env.API_TOKEN
      },
      data: {
        handle,
        amount: 10
      },
    });
  } catch (e) {
    console.log("error", e.message);
  }
  return res.data;
}

Instagram User Id

Pass a handle

async function scrapeInstagramProfile(handle) {
  try {
    const res = await axios({
      method: "POST",
      url: "<https://api.scrapecreators.com/instagram/userId>",
      headers: {
	      'x-api-token': process.env.API_TOKEN
      },
      data: {
        handle
      },
    });
    const userId = res.data.userId
    return userId
  } catch (e) {
    console.log("error", e.message);
  }
}

Instagram Profile

Pass a userId

You can pass handle , but it will cost 2 credits and be slower because its making the call to get the Instagram User Id

async function scrapeInstagramProfile(handle) {
  try {
    const res = await axios({
      method: "POST",
      url: "<https://api.scrapecreators.com/instagram/profile>",
      headers: {
	      'x-api-token': process.env.API_TOKEN
      },
      data: {
	      userId, // preferred
        handle
      },
    });
    return res.data;
  } catch (e) {
    console.log("error", e.message);
  }
}

Instagram Post

*Works with posts and reels