Package Exports
- @buildifyx/findinflu
- @buildifyx/findinflu/package.json
Readme
findinflu
CLI and Node.js API for scraping TikTok video metadata and Google keyword search results.
Scraping depends on third-party websites. Results may change or fail when TikTok or Google changes pages, blocks automation, shows consent screens, or requires captcha/login. Use responsibly and follow applicable terms, rate limits, privacy rules, and laws.
English
Requirements
- Node.js
>=18 - npm
- A machine/server that can launch Chromium
Installation
npm install @buildifyx/findinfluYou can also run the CLI with npx:
npx @buildifyx/findinflu --helpRun the latest CLI without global installation:
npx @buildifyx/findinflu@latest --helpCLI Usage
findinflu scrape <platform> <url|keyword> [-m method] [-p page]Show installed version:
npx @buildifyx/findinflu -vYou can also use:
npx @buildifyx/findinflu --version
npx @buildifyx/findinflu -versionScrape a TikTok video:
npx @buildifyx/findinflu scrape tiktok "https://www.tiktok.com/@user/video/1234567890123456789"Scrape a TikTok video with method name:
npx @buildifyx/findinflu scrape tiktok "https://www.tiktok.com/@user/video/1234567890123456789" -m videoScrape Google keyword results:
npx @buildifyx/findinflu scrape google "openai news" -p 1 -m keywordUse the latest published version without installing globally:
npx @buildifyx/findinflu@latest scrape google "openai news" -p 1 -m keywordCLI Options
| Option | Alias | Description |
|---|---|---|
-v |
--version, -version |
Show findinflu version. |
-m <name> |
--method <name> |
Select scraper method. |
-e <name> |
--engine <name> |
Alias for --method. |
-p <number> |
--page <number> |
Google result page. Default is 1. |
Supported Platforms
| Platform | Method | Input | Output |
|---|---|---|---|
tiktok |
video |
TikTok video URL | Video description, author info, video stats, author stats. |
google |
keyword |
Search keyword | Result URL, domain, title, snippet, keyword, collected time. |
Node.js API
const { runScrape, TikTok, Google, listPlatforms } = require("@buildifyx/findinflu");Use the generic runner:
const { runScrape } = require("@buildifyx/findinflu");
async function main() {
const result = await runScrape({
platform: "tiktok",
url: "https://www.tiktok.com/@user/video/1234567890123456789",
method: "video",
});
console.log(result);
}
main().catch(console.error);Google keyword example:
const { runScrape } = require("@buildifyx/findinflu");
async function main() {
const results = await runScrape({
platform: "google",
url: "openai news",
method: "keyword",
page: 1,
});
console.log(results);
}
main().catch(console.error);Use platform APIs directly:
const { TikTok, Google } = require("@buildifyx/findinflu");
async function main() {
const video = await TikTok.video(
"https://www.tiktok.com/@user/video/1234567890123456789",
);
const keywords = await Google.keyword("openai news", { page: 1 });
console.log({ video, keywords });
}
main().catch(console.error);List available platforms:
const { listPlatforms } = require("@buildifyx/findinflu");
console.log(listPlatforms());Example:
{
"google": ["keyword"],
"tiktok": ["video"]
}Output Examples
TikTok video:
{
"success": true,
"data": {
"desc": "Video description",
"author": {
"id": "123456789",
"uniqueId": "creator",
"nickname": "Creator Name",
"verified": false,
"signature": "Profile bio",
"avatar": "https://..."
},
"status": {
"diggCount": 100,
"shareCount": 10,
"commentCount": 5,
"playCount": 1000
},
"authorStats": {
"followerCount": 10000,
"followingCount": 100,
"heartCount": 50000,
"videoCount": 50
}
}
}TikTok video not found:
{
"success": false,
"data": null
}Google keyword:
[
{
"query_keyword": "openai news",
"url": "https://example.com/article",
"domain": "example.com",
"title": "Example Search Result",
"snippet": "Short result snippet from Google.",
"collected_at": "2026-04-29T00:00:00.000Z"
}
]Browser Configuration
For TikTok scraping, you can set a custom Chromium/Chrome executable:
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium npx @buildifyx/findinflu scrape tiktok "https://www.tiktok.com/@user/video/1234567890123456789"This is useful on Docker, CI, and servers where Chromium is installed separately.
Common Errors
Platform not supported: unsupported platform name.Method not found: unsupported method for the selected platform.Invalid URL: the scraper requires an HTTP or HTTPS URL.Google did not return search results: Google may have returned a consent page, block page, captcha, unusual page, or changed markup.- Browser launch failure: Chromium is missing or required system libraries are unavailable.
ภาษาไทย
สิ่งที่ต้องมี
- Node.js
>=18 - npm
- เครื่องหรือเซิร์ฟเวอร์ที่เปิด Chromium ได้
ติดตั้ง
npm install @buildifyx/findinfluหรือใช้งาน CLI ผ่าน npx:
npx @buildifyx/findinflu --helpใช้ CLI เวอร์ชันล่าสุดโดยไม่ต้องติดตั้งแบบ global:
npx @buildifyx/findinflu@latest --helpวิธีใช้ CLI
findinflu scrape <platform> <url|keyword> [-m method] [-p page]ดูเวอร์ชันที่ใช้งานอยู่:
npx @buildifyx/findinflu -vใช้แบบนี้ได้เช่นกัน:
npx @buildifyx/findinflu --version
npx @buildifyx/findinflu -versionดึงข้อมูลวิดีโอ TikTok:
npx @buildifyx/findinflu scrape tiktok "https://www.tiktok.com/@user/video/1234567890123456789"ดึงข้อมูลวิดีโอ TikTok โดยระบุ method:
npx @buildifyx/findinflu scrape tiktok "https://www.tiktok.com/@user/video/1234567890123456789" -m videoดึงผลลัพธ์ Google keyword:
npx @buildifyx/findinflu scrape google "openai news" -p 1 -m keywordใช้เวอร์ชันล่าสุดจาก npm โดยไม่ต้อง npm i -g @buildifyx/findinflu:
npx @buildifyx/findinflu@latest scrape google "openai news" -p 1 -m keywordตัวเลือก CLI
| Option | Alias | รายละเอียด |
|---|---|---|
-v |
--version, -version |
แสดงเวอร์ชันของ findinflu |
-m <name> |
--method <name> |
เลือก method ของ scraper |
-e <name> |
--engine <name> |
alias ของ --method |
-p <number> |
--page <number> |
หน้าผลลัพธ์ Google ค่าเริ่มต้นคือ 1 |
Platform ที่รองรับ
| Platform | Method | Input | Output |
|---|---|---|---|
tiktok |
video |
URL วิดีโอ TikTok | description, ข้อมูลผู้สร้าง, สถิติวิดีโอ, สถิติผู้สร้าง |
google |
keyword |
คำค้นหา | URL, domain, title, snippet, keyword, เวลาที่เก็บข้อมูล |
วิธีใช้ Node.js API
const { runScrape, TikTok, Google, listPlatforms } = require("@buildifyx/findinflu");ใช้ generic runner:
const { runScrape } = require("@buildifyx/findinflu");
async function main() {
const result = await runScrape({
platform: "tiktok",
url: "https://www.tiktok.com/@user/video/1234567890123456789",
method: "video",
});
console.log(result);
}
main().catch(console.error);ตัวอย่าง Google keyword:
const { runScrape } = require("@buildifyx/findinflu");
async function main() {
const results = await runScrape({
platform: "google",
url: "openai news",
method: "keyword",
page: 1,
});
console.log(results);
}
main().catch(console.error);ใช้ API ของแต่ละ platform:
const { TikTok, Google } = require("@buildifyx/findinflu");
async function main() {
const video = await TikTok.video(
"https://www.tiktok.com/@user/video/1234567890123456789",
);
const keywords = await Google.keyword("openai news", { page: 1 });
console.log({ video, keywords });
}
main().catch(console.error);ดู platform ที่ใช้งานได้:
const { listPlatforms } = require("@buildifyx/findinflu");
console.log(listPlatforms());ตัวอย่าง:
{
"google": ["keyword"],
"tiktok": ["video"]
}ตัวอย่าง Output
TikTok video:
{
"success": true,
"data": {
"desc": "Video description",
"author": {
"id": "123456789",
"uniqueId": "creator",
"nickname": "Creator Name",
"verified": false,
"signature": "Profile bio",
"avatar": "https://..."
},
"status": {
"diggCount": 100,
"shareCount": 10,
"commentCount": 5,
"playCount": 1000
},
"authorStats": {
"followerCount": 10000,
"followingCount": 100,
"heartCount": 50000,
"videoCount": 50
}
}
}กรณีไม่พบข้อมูลวิดีโอ TikTok:
{
"success": false,
"data": null
}Google keyword:
[
{
"query_keyword": "openai news",
"url": "https://example.com/article",
"domain": "example.com",
"title": "Example Search Result",
"snippet": "Short result snippet from Google.",
"collected_at": "2026-04-29T00:00:00.000Z"
}
]ตั้งค่า Browser
สำหรับ TikTok scraper สามารถกำหนด path ของ Chromium/Chrome เองได้:
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium npx @buildifyx/findinflu scrape tiktok "https://www.tiktok.com/@user/video/1234567890123456789"เหมาะกับ Docker, CI หรือ server ที่ติดตั้ง Chromium แยกไว้แล้ว
Error ที่พบบ่อย
Platform not supported: platform ที่ระบุยังไม่รองรับMethod not found: method ที่ระบุไม่มีใน platform นั้นInvalid URL: scraper ต้องการ URL แบบ HTTP หรือ HTTPSGoogle did not return search results: Google อาจแสดง consent page, block page, captcha, หน้าแปลก หรือ markup เปลี่ยน- Browser launch failure: ไม่มี Chromium หรือ system libraries ไม่ครบ
License
MIT