Skip to content

Commit ed39257

Browse files
feat: add targets and response types (#3)
1 parent 44824aa commit ed39257

File tree

11 files changed

+71
-2
lines changed

11 files changed

+71
-2
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "./scraping";
1+
export * from "./scraper-api";

src/scraper-api/api/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./types";

src/scraper-api/api/types.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export type ScraperApiResponse = {
2+
results: ScraperApiResult[];
3+
};
4+
5+
export type ScraperApiResult = {
6+
content: string;
7+
headers?: Record<string, string>;
8+
cookies?: Record<string, string>[];
9+
status_code: number;
10+
task_id: string;
11+
created_at: string;
12+
updated_at: string;
13+
};

src/scraper-api/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from "./api";
2+
export * from "./parameters";
3+
export * from "./targets";
File renamed without changes.

src/scraper-api/targets/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./types";

src/scraper-api/targets/types.ts

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
export enum TARGET {
2+
UNIVERSAL = "universal",
3+
4+
// google
5+
GOOGLE_SEARCH = "google_search",
6+
GOOGLE_TRAVEL_HOTELS = "google_travel_hotels",
7+
GOOGLE_TRENDS_EXPLORE = "google_trends_explore",
8+
GOOGLE_SHOPPING_SEARCH = "google_shopping_search",
9+
GOOGLE_SHOPPING_PRODUCT = "google_shopping_product",
10+
GOOGLE_SHOPPING_PRICING = "google_shopping_pricing",
11+
GOOGLE = "google",
12+
GOOGLE_IMAGES = "google_images",
13+
GOOGLE_SUGGEST = "google_suggest",
14+
GOOGLE_MAPS = "google_maps",
15+
GOOGLE_ADS = "google_ads",
16+
GOOGLE_LENS = "google_lens",
17+
BING_SEARCH = "bing_search",
18+
BING = "bing",
19+
YOUTUBE_TRANSCRIPT = "youtube_transcript",
20+
21+
// ecommerce
22+
AMAZON_PRODUCT = "amazon_product",
23+
AMAZON_PRICING = "amazon_pricing",
24+
AMAZON_REVIEWS = "amazon_reviews",
25+
AMAZON_SEARCH = "amazon_search",
26+
AMAZON_SELLERS = "amazon_sellers",
27+
AMAZON_BESTSELLERS = "amazon_bestsellers",
28+
AMAZON = "amazon",
29+
ECOMMERCE = "ecommerce",
30+
ECOMMERCE_CORE = "ecommerce_core",
31+
WALMART_PRODUCT = "walmart_product",
32+
WALMART_SEARCH = "walmart_search",
33+
WALMART = "walmart",
34+
TARGET_PRODUCT = "target_product",
35+
TARGET_SEARCH = "target_search",
36+
TARGET = "target",
37+
38+
// social media
39+
INSTAGRAM_GRAPHQL_POST = "instagram_graphql_post",
40+
INSTAGRAM_GRAPHQL_PROFILE = "instagram_graphql_profile",
41+
TIKTOK_POST = "tiktok_post",
42+
REDDIT_POST = "reddit_post",
43+
REDDIT_SUBREDDIT = "reddit_subreddit",
44+
REDDIT_USER = "reddit_user",
45+
YOUTUBE_VIDEO = "youtube_video",
46+
YOUTUBE_METADATA = "youtube_metadata",
47+
48+
// ai
49+
CHATGPT = "chatgpt",
50+
PERPLEXITY = "perplexity",
51+
GOOGLE_AI_MODE = "google_ai_mode",
52+
}

0 commit comments

Comments
 (0)