vidnavigator 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/models/TikTok.d.ts +6 -6
- package/dist/models/TikTok.js +2 -2
- package/package.json +1 -1
- package/src/models/TikTok.ts +8 -8
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ The official JavaScript/TypeScript SDK for the [VidNavigator Developer API](http
|
|
|
14
14
|
- **Instagram carousel support** — select a specific video by index, or transcribe every video in a carousel post with one call.
|
|
15
15
|
- **AI-powered analysis** — get summaries, people mentioned, places, key subjects, and direct answers to questions about any video or audio.
|
|
16
16
|
- **Structured data extraction** — define a JSON schema and receive typed, structured fields extracted from any transcript (powered by LLMs).
|
|
17
|
-
- **
|
|
17
|
+
- **AI search and reranking** — YouTube search and file search with AI ranking/reranking and rich result metadata.
|
|
18
18
|
- **File management with namespaces** — upload audio/video files, organize them into namespaces, and scope searches and analysis by folder.
|
|
19
19
|
- **Full TypeScript support** — rich types, autocompletion, and compile-time safety out of the box.
|
|
20
20
|
- **Comprehensive error handling** — dedicated error classes for every API error code (`AuthenticationError`, `RateLimitExceededError`, `GeoRestrictedError`, and more).
|
|
@@ -123,7 +123,7 @@ const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
|
123
123
|
const submitted = await vn.submitTikTokProfileScrape({
|
|
124
124
|
profile_url: 'https://www.tiktok.com/@tiktok',
|
|
125
125
|
max_posts: 250,
|
|
126
|
-
|
|
126
|
+
after_datetime: '2024-01-01',
|
|
127
127
|
});
|
|
128
128
|
|
|
129
129
|
let task = await vn.getTikTokProfileScrape(submitted.task_id, { limit: 50 });
|
|
@@ -330,10 +330,10 @@ const { data } = await vn.extractFileData({
|
|
|
330
330
|
|
|
331
331
|
### 7. Semantic search
|
|
332
332
|
|
|
333
|
-
Search
|
|
333
|
+
Search YouTube videos and uploaded files with AI-powered ranking/reranking.
|
|
334
334
|
|
|
335
335
|
```ts
|
|
336
|
-
// Search
|
|
336
|
+
// Search YouTube videos
|
|
337
337
|
const videoResults = await vn.searchVideos({
|
|
338
338
|
query: 'how to deploy a Node.js app',
|
|
339
339
|
});
|
|
@@ -412,7 +412,7 @@ All methods return a `Promise`. Responses are automatically parsed into typed mo
|
|
|
412
412
|
| `submitTikTokProfileScrape(payload)` | Start an async public TikTok profile scrape. Returns a `task_id` immediately |
|
|
413
413
|
| `getTikTokProfileScrape(task_id, query?)` | Poll task status and retrieve a page of videos. Options: `cursor`, `limit` |
|
|
414
414
|
|
|
415
|
-
Completed tasks include `videos`, `pagination`, optional scrape `stats`, and an optional short-lived `download_url` for retrieving the whole profile result as JSON.
|
|
415
|
+
Completed tasks include `videos`, `pagination`, optional scrape `stats`, and an optional short-lived `download_url` for retrieving the whole profile result as JSON. Datetime filters use `after_datetime` and `before_datetime`, each accepting either `YYYY-MM-DD` or full ISO datetime strings with timezone; TikTok video `published_at` values are parsed into JavaScript `Date` objects, and numeric counters such as `views` and `likes` are normalized to integers.
|
|
416
416
|
|
|
417
417
|
### Files
|
|
418
418
|
|
|
@@ -468,7 +468,7 @@ Returns `transcript_analysis` containing:
|
|
|
468
468
|
|
|
469
469
|
| Method | Description |
|
|
470
470
|
|--------|-------------|
|
|
471
|
-
| `searchVideos(payload)` |
|
|
471
|
+
| `searchVideos(payload)` | Search YouTube videos with AI ranking/reranking |
|
|
472
472
|
| `searchFiles(payload)` | Semantic search across uploaded files, with optional `namespace_ids` scope |
|
|
473
473
|
|
|
474
474
|
Results include `relevance_score`, `transcript_summary`, `people`, `places`, `key_subjects`, `query_answer`, `timestamps`, and `relevant_text`.
|
package/dist/models/TikTok.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export interface TikTokProfileScrapeRequest {
|
|
2
2
|
profile_url: string;
|
|
3
3
|
max_posts?: number;
|
|
4
|
-
/** Format: YYYY-MM-DD */
|
|
5
|
-
|
|
6
|
-
/** Format: YYYY-MM-DD */
|
|
7
|
-
|
|
4
|
+
/** Format: YYYY-MM-DD or ISO datetime with timezone */
|
|
5
|
+
after_datetime?: string;
|
|
6
|
+
/** Format: YYYY-MM-DD or ISO datetime with timezone */
|
|
7
|
+
before_datetime?: string;
|
|
8
8
|
min_likes?: number;
|
|
9
9
|
max_likes?: number;
|
|
10
10
|
}
|
|
@@ -62,8 +62,8 @@ export declare class TikTokVideo {
|
|
|
62
62
|
}
|
|
63
63
|
export interface TikTokProfileFilters {
|
|
64
64
|
max_posts?: number | null;
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
after_datetime?: string | null;
|
|
66
|
+
before_datetime?: string | null;
|
|
67
67
|
min_likes?: number | null;
|
|
68
68
|
max_likes?: number | null;
|
|
69
69
|
}
|
package/dist/models/TikTok.js
CHANGED
|
@@ -22,8 +22,8 @@ function normalizeFilters(filters) {
|
|
|
22
22
|
return undefined;
|
|
23
23
|
return {
|
|
24
24
|
max_posts: toInteger(filters.max_posts),
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
after_datetime: filters.after_datetime,
|
|
26
|
+
before_datetime: filters.before_datetime,
|
|
27
27
|
min_likes: toInteger(filters.min_likes),
|
|
28
28
|
max_likes: toInteger(filters.max_likes),
|
|
29
29
|
};
|
package/package.json
CHANGED
package/src/models/TikTok.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export interface TikTokProfileScrapeRequest {
|
|
2
2
|
profile_url: string;
|
|
3
3
|
max_posts?: number;
|
|
4
|
-
/** Format: YYYY-MM-DD */
|
|
5
|
-
|
|
6
|
-
/** Format: YYYY-MM-DD */
|
|
7
|
-
|
|
4
|
+
/** Format: YYYY-MM-DD or ISO datetime with timezone */
|
|
5
|
+
after_datetime?: string;
|
|
6
|
+
/** Format: YYYY-MM-DD or ISO datetime with timezone */
|
|
7
|
+
before_datetime?: string;
|
|
8
8
|
min_likes?: number;
|
|
9
9
|
max_likes?: number;
|
|
10
10
|
}
|
|
@@ -29,8 +29,8 @@ function normalizeFilters(filters: TikTokProfileFilters | undefined): TikTokProf
|
|
|
29
29
|
if (!filters) return undefined;
|
|
30
30
|
return {
|
|
31
31
|
max_posts: toInteger(filters.max_posts),
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
after_datetime: filters.after_datetime,
|
|
33
|
+
before_datetime: filters.before_datetime,
|
|
34
34
|
min_likes: toInteger(filters.min_likes),
|
|
35
35
|
max_likes: toInteger(filters.max_likes),
|
|
36
36
|
};
|
|
@@ -148,8 +148,8 @@ export class TikTokVideo {
|
|
|
148
148
|
|
|
149
149
|
export interface TikTokProfileFilters {
|
|
150
150
|
max_posts?: number | null;
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
after_datetime?: string | null;
|
|
152
|
+
before_datetime?: string | null;
|
|
153
153
|
min_likes?: number | null;
|
|
154
154
|
max_likes?: number | null;
|
|
155
155
|
}
|