@bycrawl/nodejs-sdk 0.1.1 → 0.3.0
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/dist/index.cjs +311 -66
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +166 -44
- package/dist/index.d.ts +166 -44
- package/dist/index.js +311 -66
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -406,20 +406,6 @@ interface Job104Company {
|
|
|
406
406
|
logoUrl?: string | null;
|
|
407
407
|
[key: string]: unknown;
|
|
408
408
|
}
|
|
409
|
-
interface BulkJob {
|
|
410
|
-
jobId: string;
|
|
411
|
-
status: string;
|
|
412
|
-
[key: string]: unknown;
|
|
413
|
-
}
|
|
414
|
-
interface BulkJobStatus {
|
|
415
|
-
jobId: string;
|
|
416
|
-
status: string;
|
|
417
|
-
total?: number | null;
|
|
418
|
-
completed?: number | null;
|
|
419
|
-
failed?: number | null;
|
|
420
|
-
createdAt?: string | null;
|
|
421
|
-
[key: string]: unknown;
|
|
422
|
-
}
|
|
423
409
|
|
|
424
410
|
/**
|
|
425
411
|
* APIResource Base Class
|
|
@@ -488,25 +474,30 @@ declare class Dcard extends APIResource {
|
|
|
488
474
|
|
|
489
475
|
declare class Facebook extends APIResource {
|
|
490
476
|
getUser(username: string): Promise<APIResponse<FacebookUser>>;
|
|
491
|
-
getUserPosts(username: string
|
|
477
|
+
getUserPosts(username: string, options?: {
|
|
478
|
+
count?: number;
|
|
479
|
+
}): Promise<APIResponse<FacebookPost[]>>;
|
|
480
|
+
getPagePosts(pageId: string, options?: {
|
|
481
|
+
count?: number;
|
|
482
|
+
}): Promise<APIResponse<FacebookPost[]>>;
|
|
492
483
|
getPost(options: {
|
|
493
484
|
url: string;
|
|
494
485
|
}): Promise<APIResponse<FacebookPost>>;
|
|
495
486
|
getPostComments(options: {
|
|
496
487
|
url: string;
|
|
497
|
-
cursor?: string;
|
|
498
488
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
499
489
|
searchPosts(q: string, options?: {
|
|
500
490
|
count?: number;
|
|
501
|
-
cursor?: string;
|
|
502
491
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
503
|
-
|
|
492
|
+
browseMarketplace(options?: {
|
|
493
|
+
location?: string;
|
|
504
494
|
category?: string;
|
|
505
495
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
506
|
-
|
|
496
|
+
searchMarketplace(q: string, options?: {
|
|
507
497
|
location?: string;
|
|
498
|
+
category?: string;
|
|
508
499
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
509
|
-
|
|
500
|
+
getMarketplaceItem(listingId: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
510
501
|
iterPostComments(options: {
|
|
511
502
|
url: string;
|
|
512
503
|
}): AsyncGenerator<Record<string, unknown>>;
|
|
@@ -522,6 +513,47 @@ declare class GMaps extends APIResource {
|
|
|
522
513
|
getPlace(query: string, options?: {
|
|
523
514
|
language?: string;
|
|
524
515
|
}): Promise<APIResponse<GMapsPlace>>;
|
|
516
|
+
getPlaceReviews(query: string, options?: {
|
|
517
|
+
sort?: string;
|
|
518
|
+
pageToken?: string;
|
|
519
|
+
language?: string;
|
|
520
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
declare class Google extends APIResource {
|
|
524
|
+
search(q: string, options?: {
|
|
525
|
+
num?: number;
|
|
526
|
+
language?: string;
|
|
527
|
+
country?: string;
|
|
528
|
+
page?: number;
|
|
529
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
530
|
+
news(q: string, options?: {
|
|
531
|
+
language?: string;
|
|
532
|
+
country?: string;
|
|
533
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
534
|
+
trends(q: string, options?: {
|
|
535
|
+
timeframe?: string;
|
|
536
|
+
geo?: string;
|
|
537
|
+
category?: number;
|
|
538
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
539
|
+
finance(ticker: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
540
|
+
shopping(q: string, options?: {
|
|
541
|
+
num?: number;
|
|
542
|
+
min_price?: number;
|
|
543
|
+
max_price?: number;
|
|
544
|
+
country?: string;
|
|
545
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
declare class HackerNews extends APIResource {
|
|
549
|
+
getItem(itemId: number): Promise<APIResponse<Record<string, unknown>>>;
|
|
550
|
+
getUser(username: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
551
|
+
getStories(storyType: string, options?: {
|
|
552
|
+
count?: number;
|
|
553
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
554
|
+
getItemComments(itemId: number, options?: {
|
|
555
|
+
depth?: number;
|
|
556
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
525
557
|
}
|
|
526
558
|
|
|
527
559
|
declare class Instagram extends APIResource {
|
|
@@ -557,43 +589,101 @@ declare class Job104 extends APIResource {
|
|
|
557
589
|
}
|
|
558
590
|
|
|
559
591
|
declare class LinkedIn extends APIResource {
|
|
592
|
+
searchCompanies(q: string, options?: {
|
|
593
|
+
count?: number;
|
|
594
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
560
595
|
getCompany(companyId: string): Promise<APIResponse<LinkedInCompany>>;
|
|
561
596
|
getCompanyJobs(companyId: string, options?: {
|
|
562
597
|
count?: number;
|
|
563
598
|
offset?: number;
|
|
564
599
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
565
|
-
|
|
600
|
+
getCompanyPosts(companyId: string, options?: {
|
|
601
|
+
count?: number;
|
|
602
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
603
|
+
searchJobs(q: string, options?: {
|
|
566
604
|
location?: string;
|
|
567
605
|
count?: number;
|
|
568
606
|
offset?: number;
|
|
569
607
|
}): Promise<APIResponse<LinkedInJob[]>>;
|
|
570
608
|
getJob(jobId: string): Promise<APIResponse<LinkedInJob>>;
|
|
571
609
|
getPost(postId: string): Promise<APIResponse<LinkedInPost>>;
|
|
572
|
-
searchUsers(
|
|
610
|
+
searchUsers(q: string, options?: {
|
|
573
611
|
count?: number;
|
|
574
612
|
offset?: number;
|
|
575
613
|
}): Promise<APIResponse<LinkedInUser[]>>;
|
|
576
614
|
getUser(username: string): Promise<APIResponse<LinkedInUser>>;
|
|
615
|
+
getCompanyEmployees(companyId: string, options?: {
|
|
616
|
+
count?: number;
|
|
617
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
618
|
+
getUserPosts(username: string, options?: {
|
|
619
|
+
count?: number;
|
|
620
|
+
}): Promise<APIResponse<LinkedInPost[]>>;
|
|
577
621
|
iterCompanyJobs(companyId: string, options?: {
|
|
578
622
|
count?: number;
|
|
579
623
|
}): AsyncGenerator<LinkedInJob>;
|
|
580
|
-
iterSearchJobs(
|
|
624
|
+
iterSearchJobs(q: string, options?: {
|
|
581
625
|
location?: string;
|
|
582
626
|
count?: number;
|
|
583
627
|
}): AsyncGenerator<LinkedInJob>;
|
|
584
628
|
}
|
|
585
629
|
|
|
630
|
+
declare class Luma extends APIResource {
|
|
631
|
+
getEvent(eventId: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
632
|
+
getPlaceEvents(placeId: string, options?: {
|
|
633
|
+
count?: number;
|
|
634
|
+
cursor?: string;
|
|
635
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
636
|
+
searchEvents(placeId: string, q: string, options?: {
|
|
637
|
+
count?: number;
|
|
638
|
+
cursor?: string;
|
|
639
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
640
|
+
getCategories(): Promise<APIResponse<Record<string, unknown>>>;
|
|
641
|
+
getCalendarEvents(calendarId: string, options?: {
|
|
642
|
+
count?: number;
|
|
643
|
+
cursor?: string;
|
|
644
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
645
|
+
getPlace(placeId: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
declare class ProductHunt extends APIResource {
|
|
649
|
+
getPosts(options?: {
|
|
650
|
+
count?: number;
|
|
651
|
+
date?: string;
|
|
652
|
+
period?: string;
|
|
653
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
654
|
+
searchPosts(q: string, options?: {
|
|
655
|
+
count?: number;
|
|
656
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
657
|
+
getPost(slug: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
658
|
+
getReviews(slug: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
declare class PTT extends APIResource {
|
|
662
|
+
getBoard(boardName: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
663
|
+
getBoardPosts(boardName: string, options?: {
|
|
664
|
+
page?: number;
|
|
665
|
+
count?: number;
|
|
666
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
667
|
+
getPost(url: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
668
|
+
searchPosts(boardName: string, q: string, options?: {
|
|
669
|
+
count?: number;
|
|
670
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
671
|
+
}
|
|
672
|
+
|
|
586
673
|
declare class Reddit extends APIResource {
|
|
587
674
|
getSubreddit(name: string): Promise<APIResponse<Subreddit>>;
|
|
588
675
|
getSubredditPosts(name: string, options?: {
|
|
589
676
|
sort?: string;
|
|
590
677
|
t?: string;
|
|
591
678
|
count?: number;
|
|
679
|
+
after?: string;
|
|
592
680
|
}): Promise<APIResponse<RedditPost[]>>;
|
|
593
681
|
getPost(postId: string): Promise<APIResponse<RedditPost>>;
|
|
594
682
|
searchPosts(q: string, options?: {
|
|
595
683
|
sort?: string;
|
|
684
|
+
t?: string;
|
|
596
685
|
count?: number;
|
|
686
|
+
after?: string;
|
|
597
687
|
}): Promise<APIResponse<RedditPost[]>>;
|
|
598
688
|
getUser(username: string): Promise<APIResponse<RedditUser>>;
|
|
599
689
|
getUserPosts(username: string, options?: {
|
|
@@ -604,16 +694,33 @@ declare class Reddit extends APIResource {
|
|
|
604
694
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
605
695
|
}
|
|
606
696
|
|
|
697
|
+
declare class Rent591 extends APIResource {
|
|
698
|
+
getListings(options?: {
|
|
699
|
+
region?: number;
|
|
700
|
+
first_row?: number;
|
|
701
|
+
kind?: number;
|
|
702
|
+
section?: number;
|
|
703
|
+
price?: string;
|
|
704
|
+
count?: number;
|
|
705
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
706
|
+
getListing(listingId: number): Promise<APIResponse<Record<string, unknown>>>;
|
|
707
|
+
}
|
|
708
|
+
|
|
607
709
|
declare class Threads extends APIResource {
|
|
608
|
-
getPost(postId: string
|
|
609
|
-
|
|
610
|
-
}): Promise<APIResponse<ThreadsPost>>;
|
|
611
|
-
getPosts(ids: string[], options?: {
|
|
612
|
-
mode?: string;
|
|
613
|
-
}): Promise<APIResponse<ThreadsPost[]>>;
|
|
710
|
+
getPost(postId: string): Promise<APIResponse<ThreadsPost>>;
|
|
711
|
+
getPosts(ids: string[]): Promise<APIResponse<ThreadsPost[]>>;
|
|
614
712
|
searchPosts(q: string, options?: {
|
|
615
713
|
count?: number;
|
|
714
|
+
search_type?: string;
|
|
715
|
+
cursor?: string;
|
|
616
716
|
}): Promise<APIResponse<ThreadsPost[]>>;
|
|
717
|
+
/**
|
|
718
|
+
* Get direct replies to a Threads post.
|
|
719
|
+
*
|
|
720
|
+
* Returns `{rootPost, replies, totalReplies, hasMore}`. Anonymous SSR
|
|
721
|
+
* embeds ~20 top-level replies per post; pagination is not supported.
|
|
722
|
+
*/
|
|
723
|
+
getPostReplies(postId: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
617
724
|
getUser(username: string): Promise<APIResponse<ThreadsUser>>;
|
|
618
725
|
getUserPosts(userId: string, options?: {
|
|
619
726
|
cursor?: string;
|
|
@@ -629,16 +736,8 @@ declare class Threads extends APIResource {
|
|
|
629
736
|
getPublicFeed(options?: {
|
|
630
737
|
cursor?: string;
|
|
631
738
|
count?: number;
|
|
739
|
+
country?: string;
|
|
632
740
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
633
|
-
bulkSubmit(ids: string[], options?: {
|
|
634
|
-
type?: string;
|
|
635
|
-
}): Promise<APIResponse<BulkJob>>;
|
|
636
|
-
bulkStatus(jobId: string): Promise<APIResponse<BulkJobStatus>>;
|
|
637
|
-
bulkResults(jobId: string): Promise<APIResponse<ThreadsPost[]>>;
|
|
638
|
-
bulkSubmitAndWait(ids: string[], options?: {
|
|
639
|
-
pollInterval?: number;
|
|
640
|
-
timeout?: number;
|
|
641
|
-
}): Promise<APIResponse<ThreadsPost[]>>;
|
|
642
741
|
iterUserPosts(userId: string, options?: {
|
|
643
742
|
count?: number;
|
|
644
743
|
}): AsyncGenerator<ThreadsPost>;
|
|
@@ -656,21 +755,37 @@ declare class TikTok extends APIResource {
|
|
|
656
755
|
getVideoComments(videoId: string, options?: {
|
|
657
756
|
cursor?: string;
|
|
658
757
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
659
|
-
|
|
660
|
-
category?: string;
|
|
758
|
+
search(q: string, options?: {
|
|
661
759
|
count?: number;
|
|
662
760
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
663
|
-
|
|
664
|
-
|
|
761
|
+
getVideoSubtitles(videoId: string, options?: {
|
|
762
|
+
language?: string;
|
|
665
763
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
666
|
-
getVideoSubtitles(videoId: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
667
764
|
iterVideoComments(videoId: string): AsyncGenerator<TikTokComment>;
|
|
668
765
|
}
|
|
669
766
|
|
|
767
|
+
declare class Trustpilot extends APIResource {
|
|
768
|
+
getBusiness(domain: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
769
|
+
getBusinessReviews(domain: string, options?: {
|
|
770
|
+
page?: number;
|
|
771
|
+
sort?: string;
|
|
772
|
+
stars?: number;
|
|
773
|
+
languages?: string;
|
|
774
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
775
|
+
searchBusinesses(q: string, options?: {
|
|
776
|
+
page?: number;
|
|
777
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
778
|
+
searchCategories(q: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
779
|
+
getSuggestions(q: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
780
|
+
}
|
|
781
|
+
|
|
670
782
|
declare class WebFetch extends APIResource {
|
|
671
783
|
fetch(url: string, options?: {
|
|
672
784
|
format?: string;
|
|
673
785
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
786
|
+
search(q: string, options?: {
|
|
787
|
+
count?: number;
|
|
788
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
674
789
|
}
|
|
675
790
|
|
|
676
791
|
declare class X extends APIResource {
|
|
@@ -748,7 +863,14 @@ declare class ByCrawl {
|
|
|
748
863
|
readonly youtube: YouTube;
|
|
749
864
|
readonly dcard: Dcard;
|
|
750
865
|
readonly gmaps: GMaps;
|
|
866
|
+
readonly google: Google;
|
|
867
|
+
readonly hackernews: HackerNews;
|
|
751
868
|
readonly job104: Job104;
|
|
869
|
+
readonly luma: Luma;
|
|
870
|
+
readonly producthunt: ProductHunt;
|
|
871
|
+
readonly trustpilot: Trustpilot;
|
|
872
|
+
readonly ptt: PTT;
|
|
873
|
+
readonly rent591: Rent591;
|
|
752
874
|
readonly web: WebFetch;
|
|
753
875
|
private readonly _transport;
|
|
754
876
|
constructor(options?: ByCrawlOptions);
|
|
@@ -800,4 +922,4 @@ declare class ConnectionError extends ByCrawlError {
|
|
|
800
922
|
constructor(message?: string);
|
|
801
923
|
}
|
|
802
924
|
|
|
803
|
-
export { APIError, type APIResponse, AuthenticationError,
|
|
925
|
+
export { APIError, type APIResponse, AuthenticationError, ByCrawl, ByCrawlError, type ByCrawlOptions, ConnectionError, type CreditInfo, type DcardForum, type DcardPersona, type DcardPost, type FacebookPost, type FacebookUser, type GMapsPlace, type InstagramTag, type InstagramUser, type Job104Company, type Job104Job, type LinkedInCompany, type LinkedInJob, type LinkedInPost, type LinkedInUser, NotFoundError, type PaginatedData, PermissionError, type RateLimit, RateLimitError, type RedditPost, type RedditUser, SDK_VERSION, ServerError, type Subreddit, type ThreadsMedia, type ThreadsPost, type ThreadsPostStats, type ThreadsUser, type TikTokCategory, type TikTokComment, type TikTokUser, type TikTokVideo, TimeoutError, type XPost, type XUser, type YouTubeChannel, type YouTubeComment, type YouTubeVideo };
|
package/dist/index.d.ts
CHANGED
|
@@ -406,20 +406,6 @@ interface Job104Company {
|
|
|
406
406
|
logoUrl?: string | null;
|
|
407
407
|
[key: string]: unknown;
|
|
408
408
|
}
|
|
409
|
-
interface BulkJob {
|
|
410
|
-
jobId: string;
|
|
411
|
-
status: string;
|
|
412
|
-
[key: string]: unknown;
|
|
413
|
-
}
|
|
414
|
-
interface BulkJobStatus {
|
|
415
|
-
jobId: string;
|
|
416
|
-
status: string;
|
|
417
|
-
total?: number | null;
|
|
418
|
-
completed?: number | null;
|
|
419
|
-
failed?: number | null;
|
|
420
|
-
createdAt?: string | null;
|
|
421
|
-
[key: string]: unknown;
|
|
422
|
-
}
|
|
423
409
|
|
|
424
410
|
/**
|
|
425
411
|
* APIResource Base Class
|
|
@@ -488,25 +474,30 @@ declare class Dcard extends APIResource {
|
|
|
488
474
|
|
|
489
475
|
declare class Facebook extends APIResource {
|
|
490
476
|
getUser(username: string): Promise<APIResponse<FacebookUser>>;
|
|
491
|
-
getUserPosts(username: string
|
|
477
|
+
getUserPosts(username: string, options?: {
|
|
478
|
+
count?: number;
|
|
479
|
+
}): Promise<APIResponse<FacebookPost[]>>;
|
|
480
|
+
getPagePosts(pageId: string, options?: {
|
|
481
|
+
count?: number;
|
|
482
|
+
}): Promise<APIResponse<FacebookPost[]>>;
|
|
492
483
|
getPost(options: {
|
|
493
484
|
url: string;
|
|
494
485
|
}): Promise<APIResponse<FacebookPost>>;
|
|
495
486
|
getPostComments(options: {
|
|
496
487
|
url: string;
|
|
497
|
-
cursor?: string;
|
|
498
488
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
499
489
|
searchPosts(q: string, options?: {
|
|
500
490
|
count?: number;
|
|
501
|
-
cursor?: string;
|
|
502
491
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
503
|
-
|
|
492
|
+
browseMarketplace(options?: {
|
|
493
|
+
location?: string;
|
|
504
494
|
category?: string;
|
|
505
495
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
506
|
-
|
|
496
|
+
searchMarketplace(q: string, options?: {
|
|
507
497
|
location?: string;
|
|
498
|
+
category?: string;
|
|
508
499
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
509
|
-
|
|
500
|
+
getMarketplaceItem(listingId: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
510
501
|
iterPostComments(options: {
|
|
511
502
|
url: string;
|
|
512
503
|
}): AsyncGenerator<Record<string, unknown>>;
|
|
@@ -522,6 +513,47 @@ declare class GMaps extends APIResource {
|
|
|
522
513
|
getPlace(query: string, options?: {
|
|
523
514
|
language?: string;
|
|
524
515
|
}): Promise<APIResponse<GMapsPlace>>;
|
|
516
|
+
getPlaceReviews(query: string, options?: {
|
|
517
|
+
sort?: string;
|
|
518
|
+
pageToken?: string;
|
|
519
|
+
language?: string;
|
|
520
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
declare class Google extends APIResource {
|
|
524
|
+
search(q: string, options?: {
|
|
525
|
+
num?: number;
|
|
526
|
+
language?: string;
|
|
527
|
+
country?: string;
|
|
528
|
+
page?: number;
|
|
529
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
530
|
+
news(q: string, options?: {
|
|
531
|
+
language?: string;
|
|
532
|
+
country?: string;
|
|
533
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
534
|
+
trends(q: string, options?: {
|
|
535
|
+
timeframe?: string;
|
|
536
|
+
geo?: string;
|
|
537
|
+
category?: number;
|
|
538
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
539
|
+
finance(ticker: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
540
|
+
shopping(q: string, options?: {
|
|
541
|
+
num?: number;
|
|
542
|
+
min_price?: number;
|
|
543
|
+
max_price?: number;
|
|
544
|
+
country?: string;
|
|
545
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
declare class HackerNews extends APIResource {
|
|
549
|
+
getItem(itemId: number): Promise<APIResponse<Record<string, unknown>>>;
|
|
550
|
+
getUser(username: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
551
|
+
getStories(storyType: string, options?: {
|
|
552
|
+
count?: number;
|
|
553
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
554
|
+
getItemComments(itemId: number, options?: {
|
|
555
|
+
depth?: number;
|
|
556
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
525
557
|
}
|
|
526
558
|
|
|
527
559
|
declare class Instagram extends APIResource {
|
|
@@ -557,43 +589,101 @@ declare class Job104 extends APIResource {
|
|
|
557
589
|
}
|
|
558
590
|
|
|
559
591
|
declare class LinkedIn extends APIResource {
|
|
592
|
+
searchCompanies(q: string, options?: {
|
|
593
|
+
count?: number;
|
|
594
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
560
595
|
getCompany(companyId: string): Promise<APIResponse<LinkedInCompany>>;
|
|
561
596
|
getCompanyJobs(companyId: string, options?: {
|
|
562
597
|
count?: number;
|
|
563
598
|
offset?: number;
|
|
564
599
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
565
|
-
|
|
600
|
+
getCompanyPosts(companyId: string, options?: {
|
|
601
|
+
count?: number;
|
|
602
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
603
|
+
searchJobs(q: string, options?: {
|
|
566
604
|
location?: string;
|
|
567
605
|
count?: number;
|
|
568
606
|
offset?: number;
|
|
569
607
|
}): Promise<APIResponse<LinkedInJob[]>>;
|
|
570
608
|
getJob(jobId: string): Promise<APIResponse<LinkedInJob>>;
|
|
571
609
|
getPost(postId: string): Promise<APIResponse<LinkedInPost>>;
|
|
572
|
-
searchUsers(
|
|
610
|
+
searchUsers(q: string, options?: {
|
|
573
611
|
count?: number;
|
|
574
612
|
offset?: number;
|
|
575
613
|
}): Promise<APIResponse<LinkedInUser[]>>;
|
|
576
614
|
getUser(username: string): Promise<APIResponse<LinkedInUser>>;
|
|
615
|
+
getCompanyEmployees(companyId: string, options?: {
|
|
616
|
+
count?: number;
|
|
617
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
618
|
+
getUserPosts(username: string, options?: {
|
|
619
|
+
count?: number;
|
|
620
|
+
}): Promise<APIResponse<LinkedInPost[]>>;
|
|
577
621
|
iterCompanyJobs(companyId: string, options?: {
|
|
578
622
|
count?: number;
|
|
579
623
|
}): AsyncGenerator<LinkedInJob>;
|
|
580
|
-
iterSearchJobs(
|
|
624
|
+
iterSearchJobs(q: string, options?: {
|
|
581
625
|
location?: string;
|
|
582
626
|
count?: number;
|
|
583
627
|
}): AsyncGenerator<LinkedInJob>;
|
|
584
628
|
}
|
|
585
629
|
|
|
630
|
+
declare class Luma extends APIResource {
|
|
631
|
+
getEvent(eventId: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
632
|
+
getPlaceEvents(placeId: string, options?: {
|
|
633
|
+
count?: number;
|
|
634
|
+
cursor?: string;
|
|
635
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
636
|
+
searchEvents(placeId: string, q: string, options?: {
|
|
637
|
+
count?: number;
|
|
638
|
+
cursor?: string;
|
|
639
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
640
|
+
getCategories(): Promise<APIResponse<Record<string, unknown>>>;
|
|
641
|
+
getCalendarEvents(calendarId: string, options?: {
|
|
642
|
+
count?: number;
|
|
643
|
+
cursor?: string;
|
|
644
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
645
|
+
getPlace(placeId: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
declare class ProductHunt extends APIResource {
|
|
649
|
+
getPosts(options?: {
|
|
650
|
+
count?: number;
|
|
651
|
+
date?: string;
|
|
652
|
+
period?: string;
|
|
653
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
654
|
+
searchPosts(q: string, options?: {
|
|
655
|
+
count?: number;
|
|
656
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
657
|
+
getPost(slug: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
658
|
+
getReviews(slug: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
declare class PTT extends APIResource {
|
|
662
|
+
getBoard(boardName: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
663
|
+
getBoardPosts(boardName: string, options?: {
|
|
664
|
+
page?: number;
|
|
665
|
+
count?: number;
|
|
666
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
667
|
+
getPost(url: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
668
|
+
searchPosts(boardName: string, q: string, options?: {
|
|
669
|
+
count?: number;
|
|
670
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
671
|
+
}
|
|
672
|
+
|
|
586
673
|
declare class Reddit extends APIResource {
|
|
587
674
|
getSubreddit(name: string): Promise<APIResponse<Subreddit>>;
|
|
588
675
|
getSubredditPosts(name: string, options?: {
|
|
589
676
|
sort?: string;
|
|
590
677
|
t?: string;
|
|
591
678
|
count?: number;
|
|
679
|
+
after?: string;
|
|
592
680
|
}): Promise<APIResponse<RedditPost[]>>;
|
|
593
681
|
getPost(postId: string): Promise<APIResponse<RedditPost>>;
|
|
594
682
|
searchPosts(q: string, options?: {
|
|
595
683
|
sort?: string;
|
|
684
|
+
t?: string;
|
|
596
685
|
count?: number;
|
|
686
|
+
after?: string;
|
|
597
687
|
}): Promise<APIResponse<RedditPost[]>>;
|
|
598
688
|
getUser(username: string): Promise<APIResponse<RedditUser>>;
|
|
599
689
|
getUserPosts(username: string, options?: {
|
|
@@ -604,16 +694,33 @@ declare class Reddit extends APIResource {
|
|
|
604
694
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
605
695
|
}
|
|
606
696
|
|
|
697
|
+
declare class Rent591 extends APIResource {
|
|
698
|
+
getListings(options?: {
|
|
699
|
+
region?: number;
|
|
700
|
+
first_row?: number;
|
|
701
|
+
kind?: number;
|
|
702
|
+
section?: number;
|
|
703
|
+
price?: string;
|
|
704
|
+
count?: number;
|
|
705
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
706
|
+
getListing(listingId: number): Promise<APIResponse<Record<string, unknown>>>;
|
|
707
|
+
}
|
|
708
|
+
|
|
607
709
|
declare class Threads extends APIResource {
|
|
608
|
-
getPost(postId: string
|
|
609
|
-
|
|
610
|
-
}): Promise<APIResponse<ThreadsPost>>;
|
|
611
|
-
getPosts(ids: string[], options?: {
|
|
612
|
-
mode?: string;
|
|
613
|
-
}): Promise<APIResponse<ThreadsPost[]>>;
|
|
710
|
+
getPost(postId: string): Promise<APIResponse<ThreadsPost>>;
|
|
711
|
+
getPosts(ids: string[]): Promise<APIResponse<ThreadsPost[]>>;
|
|
614
712
|
searchPosts(q: string, options?: {
|
|
615
713
|
count?: number;
|
|
714
|
+
search_type?: string;
|
|
715
|
+
cursor?: string;
|
|
616
716
|
}): Promise<APIResponse<ThreadsPost[]>>;
|
|
717
|
+
/**
|
|
718
|
+
* Get direct replies to a Threads post.
|
|
719
|
+
*
|
|
720
|
+
* Returns `{rootPost, replies, totalReplies, hasMore}`. Anonymous SSR
|
|
721
|
+
* embeds ~20 top-level replies per post; pagination is not supported.
|
|
722
|
+
*/
|
|
723
|
+
getPostReplies(postId: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
617
724
|
getUser(username: string): Promise<APIResponse<ThreadsUser>>;
|
|
618
725
|
getUserPosts(userId: string, options?: {
|
|
619
726
|
cursor?: string;
|
|
@@ -629,16 +736,8 @@ declare class Threads extends APIResource {
|
|
|
629
736
|
getPublicFeed(options?: {
|
|
630
737
|
cursor?: string;
|
|
631
738
|
count?: number;
|
|
739
|
+
country?: string;
|
|
632
740
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
633
|
-
bulkSubmit(ids: string[], options?: {
|
|
634
|
-
type?: string;
|
|
635
|
-
}): Promise<APIResponse<BulkJob>>;
|
|
636
|
-
bulkStatus(jobId: string): Promise<APIResponse<BulkJobStatus>>;
|
|
637
|
-
bulkResults(jobId: string): Promise<APIResponse<ThreadsPost[]>>;
|
|
638
|
-
bulkSubmitAndWait(ids: string[], options?: {
|
|
639
|
-
pollInterval?: number;
|
|
640
|
-
timeout?: number;
|
|
641
|
-
}): Promise<APIResponse<ThreadsPost[]>>;
|
|
642
741
|
iterUserPosts(userId: string, options?: {
|
|
643
742
|
count?: number;
|
|
644
743
|
}): AsyncGenerator<ThreadsPost>;
|
|
@@ -656,21 +755,37 @@ declare class TikTok extends APIResource {
|
|
|
656
755
|
getVideoComments(videoId: string, options?: {
|
|
657
756
|
cursor?: string;
|
|
658
757
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
659
|
-
|
|
660
|
-
category?: string;
|
|
758
|
+
search(q: string, options?: {
|
|
661
759
|
count?: number;
|
|
662
760
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
663
|
-
|
|
664
|
-
|
|
761
|
+
getVideoSubtitles(videoId: string, options?: {
|
|
762
|
+
language?: string;
|
|
665
763
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
666
|
-
getVideoSubtitles(videoId: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
667
764
|
iterVideoComments(videoId: string): AsyncGenerator<TikTokComment>;
|
|
668
765
|
}
|
|
669
766
|
|
|
767
|
+
declare class Trustpilot extends APIResource {
|
|
768
|
+
getBusiness(domain: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
769
|
+
getBusinessReviews(domain: string, options?: {
|
|
770
|
+
page?: number;
|
|
771
|
+
sort?: string;
|
|
772
|
+
stars?: number;
|
|
773
|
+
languages?: string;
|
|
774
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
775
|
+
searchBusinesses(q: string, options?: {
|
|
776
|
+
page?: number;
|
|
777
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
778
|
+
searchCategories(q: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
779
|
+
getSuggestions(q: string): Promise<APIResponse<Record<string, unknown>>>;
|
|
780
|
+
}
|
|
781
|
+
|
|
670
782
|
declare class WebFetch extends APIResource {
|
|
671
783
|
fetch(url: string, options?: {
|
|
672
784
|
format?: string;
|
|
673
785
|
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
786
|
+
search(q: string, options?: {
|
|
787
|
+
count?: number;
|
|
788
|
+
}): Promise<APIResponse<Record<string, unknown>>>;
|
|
674
789
|
}
|
|
675
790
|
|
|
676
791
|
declare class X extends APIResource {
|
|
@@ -748,7 +863,14 @@ declare class ByCrawl {
|
|
|
748
863
|
readonly youtube: YouTube;
|
|
749
864
|
readonly dcard: Dcard;
|
|
750
865
|
readonly gmaps: GMaps;
|
|
866
|
+
readonly google: Google;
|
|
867
|
+
readonly hackernews: HackerNews;
|
|
751
868
|
readonly job104: Job104;
|
|
869
|
+
readonly luma: Luma;
|
|
870
|
+
readonly producthunt: ProductHunt;
|
|
871
|
+
readonly trustpilot: Trustpilot;
|
|
872
|
+
readonly ptt: PTT;
|
|
873
|
+
readonly rent591: Rent591;
|
|
752
874
|
readonly web: WebFetch;
|
|
753
875
|
private readonly _transport;
|
|
754
876
|
constructor(options?: ByCrawlOptions);
|
|
@@ -800,4 +922,4 @@ declare class ConnectionError extends ByCrawlError {
|
|
|
800
922
|
constructor(message?: string);
|
|
801
923
|
}
|
|
802
924
|
|
|
803
|
-
export { APIError, type APIResponse, AuthenticationError,
|
|
925
|
+
export { APIError, type APIResponse, AuthenticationError, ByCrawl, ByCrawlError, type ByCrawlOptions, ConnectionError, type CreditInfo, type DcardForum, type DcardPersona, type DcardPost, type FacebookPost, type FacebookUser, type GMapsPlace, type InstagramTag, type InstagramUser, type Job104Company, type Job104Job, type LinkedInCompany, type LinkedInJob, type LinkedInPost, type LinkedInUser, NotFoundError, type PaginatedData, PermissionError, type RateLimit, RateLimitError, type RedditPost, type RedditUser, SDK_VERSION, ServerError, type Subreddit, type ThreadsMedia, type ThreadsPost, type ThreadsPostStats, type ThreadsUser, type TikTokCategory, type TikTokComment, type TikTokUser, type TikTokVideo, TimeoutError, type XPost, type XUser, type YouTubeChannel, type YouTubeComment, type YouTubeVideo };
|