Email me if you need anything: [email protected]
https://youtu.be/ttUEPdwMnk8?si=iYHZfkB2vVxilf7O
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);
}
}
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;
}
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);
}
}
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);
}
}
*Works with posts and reels