@socialrouter/sdk 0.1.0 → 0.3.1
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 +63 -60
- package/dist/client.d.ts +12 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +56 -9
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/types.d.ts +65 -8
- package/dist/types.d.ts.map +1 -1
- package/package.json +18 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SocialRouter SDK
|
|
2
2
|
|
|
3
|
-
A unified API to extract data from social media platforms. SocialRouter acts as an abstraction layer over multiple data providers (
|
|
3
|
+
A unified API to extract data from social media platforms. SocialRouter acts as an abstraction layer over multiple data providers (Apify, BrightData, etc.), offering a single interface, normalized data format, and automatic failover.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ const client = new SocialRouter({
|
|
|
19
19
|
|
|
20
20
|
const result = await client.extractAndWait({
|
|
21
21
|
url: "https://www.linkedin.com/posts/johndoe_ai-sales-1234567890",
|
|
22
|
-
|
|
22
|
+
provider: "apify/linkedin/post.likes",
|
|
23
23
|
limit: 100,
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -28,46 +28,11 @@ for (const person of result.data) {
|
|
|
28
28
|
}
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## Provider slugs
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
The `provider` field is a slug of the form `<provider>/<platform>/<type>[:<tag>]` — for example `apify/linkedin/profile.info`, `apify/linkedin/profile.posts:apimaestro`, or `apify/googlemaps/place.search`. It fully specifies the routing target: which provider, which platform, which extraction or search type, and (optionally) which actor variant.
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
provider/extraction_type
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Available Models
|
|
40
|
-
|
|
41
|
-
| Model | Description |
|
|
42
|
-
|-------|-------------|
|
|
43
|
-
| `lobstr/post.likes` | Post likes via Lobstr |
|
|
44
|
-
| `lobstr/post.comments` | Post comments via Lobstr |
|
|
45
|
-
| `lobstr/profile.info` | Profile info via Lobstr |
|
|
46
|
-
| `lobstr/profile.posts` | Profile posts via Lobstr |
|
|
47
|
-
| `apify/post.likes` | Post likes via Apify |
|
|
48
|
-
| `apify/post.comments` | Post comments via Apify |
|
|
49
|
-
| `apify/profile.info` | Profile info via Apify |
|
|
50
|
-
| `apify/profile.posts` | Profile posts via Apify |
|
|
51
|
-
| `apify/profile.followers` | Followers via Apify |
|
|
52
|
-
|
|
53
|
-
Browse all models and pricing at [socialrouter.io/providers](https://socialrouter.io/providers).
|
|
54
|
-
|
|
55
|
-
## Supported Platforms
|
|
56
|
-
|
|
57
|
-
- **LinkedIn** - profiles, posts, likes, comments, followers
|
|
58
|
-
- **Instagram** - profiles, posts, likes, comments, followers
|
|
59
|
-
- **X (Twitter)** - profiles, posts, likes, comments, followers
|
|
60
|
-
- **Reddit** - profiles, posts, likes, comments, followers
|
|
61
|
-
|
|
62
|
-
## Extraction Types
|
|
63
|
-
|
|
64
|
-
| Type | Description |
|
|
65
|
-
|------|-------------|
|
|
66
|
-
| `post.likes` | People who liked/reacted to a post |
|
|
67
|
-
| `post.comments` | People who commented on a post |
|
|
68
|
-
| `profile.info` | Profile metadata (name, bio, company, location) |
|
|
69
|
-
| `profile.posts` | Recent posts from a profile or page |
|
|
70
|
-
| `profile.followers` | Followers of a profile or page |
|
|
35
|
+
Browse the full catalogue (with pricing and copy buttons) at [socialrouter.io/providers](https://www.socialrouter.io/providers).
|
|
71
36
|
|
|
72
37
|
## Configuration
|
|
73
38
|
|
|
@@ -78,16 +43,14 @@ const client = new SocialRouter({
|
|
|
78
43
|
});
|
|
79
44
|
```
|
|
80
45
|
|
|
81
|
-
## Extracting Data
|
|
46
|
+
## Extracting Data (URL-driven)
|
|
82
47
|
|
|
83
48
|
### Extract and wait (recommended)
|
|
84
49
|
|
|
85
|
-
The simplest approach. Launches the extraction and polls automatically until the result is ready:
|
|
86
|
-
|
|
87
50
|
```typescript
|
|
88
51
|
const result = await client.extractAndWait({
|
|
89
52
|
url: "https://www.linkedin.com/posts/johndoe_ai-sales-1234567890",
|
|
90
|
-
|
|
53
|
+
provider: "apify/linkedin/post.likes",
|
|
91
54
|
limit: 100,
|
|
92
55
|
});
|
|
93
56
|
|
|
@@ -100,37 +63,52 @@ You can customize the polling behavior:
|
|
|
100
63
|
|
|
101
64
|
```typescript
|
|
102
65
|
const result = await client.extractAndWait(
|
|
103
|
-
{ url: "...",
|
|
66
|
+
{ url: "...", provider: "apify/linkedin/post.likes" },
|
|
104
67
|
5000, // Poll every 5 seconds (default: 3000)
|
|
105
68
|
60000, // Timeout after 60 seconds (default: 120000)
|
|
106
69
|
);
|
|
107
70
|
```
|
|
108
71
|
|
|
109
|
-
###
|
|
72
|
+
### Batch URLs
|
|
73
|
+
|
|
74
|
+
When the target actor accepts batches, pass `urls` instead of `url`:
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
const result = await client.extractAndWait({
|
|
78
|
+
urls: [
|
|
79
|
+
"https://linkedin.com/in/alice",
|
|
80
|
+
"https://linkedin.com/in/bob",
|
|
81
|
+
"https://linkedin.com/in/carol",
|
|
82
|
+
],
|
|
83
|
+
provider: "apify/linkedin/profile.info",
|
|
84
|
+
limit: 50,
|
|
85
|
+
});
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Disable fallback
|
|
89
|
+
|
|
90
|
+
By default, the router walks the provider chain when the requested one fails. Pass `fallback: false` to attempt only the requested provider and surface its error directly:
|
|
110
91
|
|
|
111
92
|
```typescript
|
|
112
93
|
await client.extract({
|
|
113
|
-
url: "https://linkedin.com/in/johndoe",
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
cache: true, // Enable caching (optional)
|
|
117
|
-
webhook_url: "https://myapp.com/hook", // Async callback URL (optional)
|
|
94
|
+
url: "https://linkedin.com/in/johndoe",
|
|
95
|
+
provider: "apify/linkedin/profile.info",
|
|
96
|
+
fallback: false,
|
|
118
97
|
});
|
|
119
98
|
```
|
|
120
99
|
|
|
121
|
-
|
|
100
|
+
When a fallback was used, the response includes `fallback_from` (the initially-requested provider).
|
|
122
101
|
|
|
123
|
-
|
|
102
|
+
### Manual polling
|
|
124
103
|
|
|
125
104
|
```typescript
|
|
126
105
|
const extraction = await client.extract({
|
|
127
106
|
url: "https://linkedin.com/posts/...",
|
|
128
|
-
|
|
107
|
+
provider: "apify/linkedin/post.likes",
|
|
129
108
|
});
|
|
130
109
|
|
|
131
110
|
console.log(extraction.id); // "ext_abc123"
|
|
132
111
|
|
|
133
|
-
// Check the result later
|
|
134
112
|
const result = await client.getExtraction(extraction.id);
|
|
135
113
|
|
|
136
114
|
if (result.status === "completed") {
|
|
@@ -140,6 +118,24 @@ if (result.status === "completed") {
|
|
|
140
118
|
}
|
|
141
119
|
```
|
|
142
120
|
|
|
121
|
+
## Searching (query-driven)
|
|
122
|
+
|
|
123
|
+
For services where the input is a query rather than a URL (e.g. Google Maps place search), use `search` / `searchAndWait`:
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
const result = await client.searchAndWait({
|
|
127
|
+
queries: ["coffee shops in Brooklyn", "bakeries in Brooklyn"],
|
|
128
|
+
provider: "apify/googlemaps/place.search",
|
|
129
|
+
limit: 100,
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
console.log(result.kind); // "search"
|
|
133
|
+
console.log(result.queries); // ["coffee shops in Brooklyn", ...]
|
|
134
|
+
console.log(result.data); // ExtractionRecord[]
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Search and extract share the same response shape; only `kind`, `queries`, and the supported `type` differ.
|
|
138
|
+
|
|
143
139
|
## Providers
|
|
144
140
|
|
|
145
141
|
```typescript
|
|
@@ -148,11 +144,15 @@ const providers = await client.listProviders();
|
|
|
148
144
|
|
|
149
145
|
for (const p of providers) {
|
|
150
146
|
console.log(`${p.name} [${p.status}] - ${p.supported_platforms.join(", ")}`);
|
|
147
|
+
if (p.supported_search_types?.length) {
|
|
148
|
+
console.log(` search: ${p.supported_search_types.join(", ")}`);
|
|
149
|
+
}
|
|
151
150
|
}
|
|
152
151
|
|
|
153
152
|
// Get provider details including pricing
|
|
154
|
-
const detail = await client.getProvider("
|
|
155
|
-
console.log(detail.pricing);
|
|
153
|
+
const detail = await client.getProvider("apify");
|
|
154
|
+
console.log(detail.pricing); // per-extraction pricing
|
|
155
|
+
console.log(detail.search_pricing); // per-search pricing (if any)
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
## Account
|
|
@@ -171,8 +171,6 @@ console.log(`Credits used: $${usage.total_credits}`);
|
|
|
171
171
|
|
|
172
172
|
## Error Handling
|
|
173
173
|
|
|
174
|
-
The SDK exposes specific error classes for each failure case:
|
|
175
|
-
|
|
176
174
|
```typescript
|
|
177
175
|
import {
|
|
178
176
|
SocialRouter,
|
|
@@ -183,7 +181,7 @@ import {
|
|
|
183
181
|
} from "@socialrouter/sdk";
|
|
184
182
|
|
|
185
183
|
try {
|
|
186
|
-
await client.extractAndWait({ url: "...",
|
|
184
|
+
await client.extractAndWait({ url: "...", provider: "apify/linkedin/post.likes" });
|
|
187
185
|
} catch (err) {
|
|
188
186
|
if (err instanceof AuthenticationError) {
|
|
189
187
|
// 401 - Invalid or missing API key
|
|
@@ -207,13 +205,18 @@ All types are exported for direct use:
|
|
|
207
205
|
import type {
|
|
208
206
|
SocialRouterConfig,
|
|
209
207
|
ExtractOptions,
|
|
208
|
+
SearchOptions,
|
|
210
209
|
Extraction,
|
|
211
210
|
ExtractionRecord,
|
|
212
211
|
ExtractionType,
|
|
213
212
|
ExtractionStatus,
|
|
213
|
+
ExtractionKind,
|
|
214
|
+
SearchType,
|
|
215
|
+
ServiceType,
|
|
214
216
|
Platform,
|
|
215
217
|
ProviderInfo,
|
|
216
218
|
ProviderDetail,
|
|
219
|
+
ProviderStatus,
|
|
217
220
|
AccountBalance,
|
|
218
221
|
UsageSummary,
|
|
219
222
|
ApiErrorDetail,
|
package/dist/client.d.ts
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
import type { SocialRouterConfig, ExtractOptions, Extraction, ProviderInfo, ProviderDetail, AccountBalance, UsageSummary } from "./types.js";
|
|
1
|
+
import type { SocialRouterConfig, ExtractOptions, SearchOptions, Extraction, ProviderInfo, ProviderDetail, AccountBalance, UsageSummary } from "./types.js";
|
|
2
2
|
export declare class SocialRouter {
|
|
3
3
|
private apiKey;
|
|
4
4
|
private baseUrl;
|
|
5
5
|
constructor(config: SocialRouterConfig);
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Run a URL-driven data extraction. Pass either `url` (single) or `urls`
|
|
8
|
+
* (batch — only meaningful when the target provider/actor accepts batches).
|
|
9
|
+
*/
|
|
7
10
|
extract(options: ExtractOptions): Promise<Extraction>;
|
|
11
|
+
/**
|
|
12
|
+
* Run a query-driven search. The slug grammar matches `extract`, but the
|
|
13
|
+
* `type` segment must belong to the SearchType union (e.g. `place.search`).
|
|
14
|
+
*/
|
|
15
|
+
search(options: SearchOptions): Promise<Extraction>;
|
|
8
16
|
/** Get extraction by ID (for polling async results) */
|
|
9
17
|
getExtraction(id: string): Promise<Extraction>;
|
|
10
18
|
/** Extract and poll until completed (convenience method) */
|
|
11
19
|
extractAndWait(options: ExtractOptions, pollIntervalMs?: number, timeoutMs?: number): Promise<Extraction>;
|
|
20
|
+
/** Run a search and poll until completed (convenience method) */
|
|
21
|
+
searchAndWait(options: SearchOptions, pollIntervalMs?: number, timeoutMs?: number): Promise<Extraction>;
|
|
12
22
|
/** List all providers */
|
|
13
23
|
listProviders(): Promise<ProviderInfo[]>;
|
|
14
24
|
/** Get provider detail */
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts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AAC,YAAY,CAAC;YAM1C,GAAG;YAIH,IAAI;YAIJ,OAAO;CAoCtB"}
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SocialRouterError, AuthenticationError, InsufficientCreditsError, RateLimitError, } from "./errors.js";
|
|
2
2
|
const DEFAULT_BASE_URL = "https://api.socialrouter.io";
|
|
3
|
+
const SDK_VERSION = "0.3.0";
|
|
3
4
|
export class SocialRouter {
|
|
4
5
|
apiKey;
|
|
5
6
|
baseUrl;
|
|
@@ -8,15 +9,47 @@ export class SocialRouter {
|
|
|
8
9
|
this.baseUrl = (config.baseUrl ?? DEFAULT_BASE_URL).replace(/\/$/, "");
|
|
9
10
|
}
|
|
10
11
|
// ─── Extract ─────────────────────────────────────────
|
|
11
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Run a URL-driven data extraction. Pass either `url` (single) or `urls`
|
|
14
|
+
* (batch — only meaningful when the target provider/actor accepts batches).
|
|
15
|
+
*/
|
|
12
16
|
async extract(options) {
|
|
13
|
-
|
|
14
|
-
url: options.url,
|
|
15
|
-
type: options.type,
|
|
16
|
-
limit: options.limit ?? 100,
|
|
17
|
+
const body = {
|
|
17
18
|
provider: options.provider,
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
};
|
|
20
|
+
if (options.urls !== undefined) {
|
|
21
|
+
body.urls = options.urls;
|
|
22
|
+
}
|
|
23
|
+
else if (options.url !== undefined) {
|
|
24
|
+
body.url = options.url;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
throw new Error("extract() requires either 'url' or 'urls'.");
|
|
28
|
+
}
|
|
29
|
+
if (options.limit !== undefined)
|
|
30
|
+
body.limit = options.limit;
|
|
31
|
+
if (options.fallback !== undefined)
|
|
32
|
+
body.fallback = options.fallback;
|
|
33
|
+
if (options.options !== undefined)
|
|
34
|
+
body.options = options.options;
|
|
35
|
+
return this.post("/v1/extract", body);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Run a query-driven search. The slug grammar matches `extract`, but the
|
|
39
|
+
* `type` segment must belong to the SearchType union (e.g. `place.search`).
|
|
40
|
+
*/
|
|
41
|
+
async search(options) {
|
|
42
|
+
const body = {
|
|
43
|
+
queries: options.queries,
|
|
44
|
+
provider: options.provider,
|
|
45
|
+
};
|
|
46
|
+
if (options.limit !== undefined)
|
|
47
|
+
body.limit = options.limit;
|
|
48
|
+
if (options.fallback !== undefined)
|
|
49
|
+
body.fallback = options.fallback;
|
|
50
|
+
if (options.options !== undefined)
|
|
51
|
+
body.options = options.options;
|
|
52
|
+
return this.post("/v1/search", body);
|
|
20
53
|
}
|
|
21
54
|
/** Get extraction by ID (for polling async results) */
|
|
22
55
|
async getExtraction(id) {
|
|
@@ -28,7 +61,6 @@ export class SocialRouter {
|
|
|
28
61
|
if (extraction.status === "completed" || extraction.status === "failed") {
|
|
29
62
|
return extraction;
|
|
30
63
|
}
|
|
31
|
-
// Poll
|
|
32
64
|
const start = Date.now();
|
|
33
65
|
while (Date.now() - start < timeoutMs) {
|
|
34
66
|
await new Promise((r) => setTimeout(r, pollIntervalMs));
|
|
@@ -38,6 +70,21 @@ export class SocialRouter {
|
|
|
38
70
|
}
|
|
39
71
|
throw new Error(`Extraction ${extraction.id} timed out after ${timeoutMs}ms`);
|
|
40
72
|
}
|
|
73
|
+
/** Run a search and poll until completed (convenience method) */
|
|
74
|
+
async searchAndWait(options, pollIntervalMs = 3000, timeoutMs = 120000) {
|
|
75
|
+
const extraction = await this.search(options);
|
|
76
|
+
if (extraction.status === "completed" || extraction.status === "failed") {
|
|
77
|
+
return extraction;
|
|
78
|
+
}
|
|
79
|
+
const start = Date.now();
|
|
80
|
+
while (Date.now() - start < timeoutMs) {
|
|
81
|
+
await new Promise((r) => setTimeout(r, pollIntervalMs));
|
|
82
|
+
const result = await this.getExtraction(extraction.id);
|
|
83
|
+
if (result.status !== "pending")
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
throw new Error(`Search ${extraction.id} timed out after ${timeoutMs}ms`);
|
|
87
|
+
}
|
|
41
88
|
// ─── Providers ───────────────────────────────────────
|
|
42
89
|
/** List all providers */
|
|
43
90
|
async listProviders() {
|
|
@@ -71,7 +118,7 @@ export class SocialRouter {
|
|
|
71
118
|
headers: {
|
|
72
119
|
Authorization: `Bearer ${this.apiKey}`,
|
|
73
120
|
"Content-Type": "application/json",
|
|
74
|
-
"User-Agent":
|
|
121
|
+
"User-Agent": `socialrouter-sdk/${SDK_VERSION}`,
|
|
75
122
|
},
|
|
76
123
|
...(body ? { body: JSON.stringify(body) } : {}),
|
|
77
124
|
});
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,GACf,MAAM,aAAa,CAAC;AAErB,MAAM,gBAAgB,GAAG,6BAA6B,CAAC;AACvD,MAAM,WAAW,GAAG,OAAO,CAAC;AAE5B,MAAM,OAAO,YAAY;IACf,MAAM,CAAS;IACf,OAAO,CAAS;IAExB,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,gBAAgB,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACzE,CAAC;IAED,wDAAwD;IAExD;;;OAGG;IACH,KAAK,CAAC,OAAO,CAAC,OAAuB;QACnC,MAAM,IAAI,GAA4B;YACpC,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAC;QACF,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,IAAI,CAAC,IAAI,GAAG,OAAO,CA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AAU,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;gBAChF,CAAC;gBACD;oBACE,MAAM,IAAI,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;YACpD,CAAC;QACH,CAAC;QAED,OAAO,GAAG,CAAC,IAAI,EAAgB,CAAC;IAClC,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { SocialRouter } from "./client.js";
|
|
2
2
|
export { SocialRouterError, AuthenticationError, InsufficientCreditsError, RateLimitError, } from "./errors.js";
|
|
3
|
-
export type { SocialRouterConfig, ExtractOptions, Extraction, ExtractionRecord, ExtractionType, ExtractionStatus, Platform, ProviderInfo, ProviderDetail, AccountBalance, UsageSummary, ApiErrorDetail, } from "./types.js";
|
|
3
|
+
export type { SocialRouterConfig, ExtractOptions, SearchOptions, Extraction, ExtractionRecord, ExtractionType, ExtractionStatus, ExtractionKind, SearchType, ServiceType, Platform, ProviderInfo, ProviderDetail, ProviderStatus, AccountBalance, UsageSummary, ApiErrorDetail, } from "./types.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,GACf,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,cAAc,EACd,YAAY,EACZ,cAAc,GACf,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,GACf,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,cAAc,GACf,MAAM,YAAY,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,12 +1,53 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export type
|
|
1
|
+
export type Platform = "linkedin" | "instagram" | "x" | "reddit" | "facebook" | "tiktok" | "youtube" | "pinterest" | "bluesky" | "snapchat" | "googlemaps";
|
|
2
|
+
export type ExtractionType = "post.likes" | "post.comments" | "post.info" | "profile.info" | "profile.posts" | "profile.reels" | "profile.shorts" | "profile.followers" | "company.info" | "company.reviews" | "group.posts" | "job.listings" | "event.info" | "marketplace.listings" | "video.info" | "video.transcript" | "channel.info" | "playlist.posts" | "hashtag.posts" | "place.info" | "place.reviews";
|
|
3
|
+
export type SearchType = "place.search" | "video.search";
|
|
4
|
+
export type ServiceType = ExtractionType | SearchType;
|
|
3
5
|
export type ExtractionStatus = "pending" | "completed" | "failed";
|
|
6
|
+
export type ExtractionKind = "extract" | "search";
|
|
7
|
+
export type ProviderStatus = "active" | "degraded" | "down" | "coming_soon";
|
|
4
8
|
export interface ExtractOptions {
|
|
5
|
-
|
|
6
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Single URL to extract from. Use `urls` for batch-capable providers when
|
|
11
|
+
* sending more than one URL in a single request.
|
|
12
|
+
*/
|
|
13
|
+
url?: string;
|
|
14
|
+
/** Batch form — non-empty array of URLs. Mutually exclusive with `url`. */
|
|
15
|
+
urls?: string[];
|
|
16
|
+
/**
|
|
17
|
+
* Service slug of the form `<provider>/<platform>/<type>[:<tag>]`
|
|
18
|
+
* (e.g. `apify/linkedin/profile.info` or
|
|
19
|
+
* `apify/linkedin/profile.posts:apimaestro`). The `:tag` suffix is optional
|
|
20
|
+
* and selects a specific actor/dataset variant.
|
|
21
|
+
*/
|
|
22
|
+
provider: string;
|
|
23
|
+
limit?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to fall over to alternative providers if the requested one fails.
|
|
26
|
+
* Defaults to `true`. Set to `false` to attempt only the requested provider
|
|
27
|
+
* and surface its error directly.
|
|
28
|
+
*/
|
|
29
|
+
fallback?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Per-actor input overrides. Plain JSON object — each actor decides which
|
|
32
|
+
* keys it honors via its `buildInput` allowlist (unknown keys are dropped
|
|
33
|
+
* server-side). Use this for actor-specific knobs that don't have a
|
|
34
|
+
* first-class slot in the request body (e.g. `proxyCountry`, `language`).
|
|
35
|
+
*/
|
|
36
|
+
options?: Record<string, unknown>;
|
|
37
|
+
}
|
|
38
|
+
export interface SearchOptions {
|
|
39
|
+
/** Non-empty list of search queries (terms or context-pinning URLs). */
|
|
40
|
+
queries: string[];
|
|
41
|
+
/**
|
|
42
|
+
* Service slug `<provider>/<platform>/<type>[:<tag>]` whose `type` belongs
|
|
43
|
+
* to the SearchType union (e.g. `apify/googlemaps/place.search:compass`).
|
|
44
|
+
*/
|
|
45
|
+
provider: string;
|
|
7
46
|
limit?: number;
|
|
8
|
-
|
|
9
|
-
|
|
47
|
+
/** Defaults to `true`. See `ExtractOptions.fallback`. */
|
|
48
|
+
fallback?: boolean;
|
|
49
|
+
/** Per-actor input overrides. See `ExtractOptions.options`. */
|
|
50
|
+
options?: Record<string, unknown>;
|
|
10
51
|
}
|
|
11
52
|
export interface ExtractionRecord {
|
|
12
53
|
name: string;
|
|
@@ -20,11 +61,19 @@ export interface ExtractionRecord {
|
|
|
20
61
|
}
|
|
21
62
|
export interface Extraction {
|
|
22
63
|
id: string;
|
|
64
|
+
kind: ExtractionKind;
|
|
23
65
|
status: ExtractionStatus;
|
|
24
66
|
source: Platform;
|
|
25
|
-
type: ExtractionType;
|
|
67
|
+
type: ExtractionType | SearchType;
|
|
26
68
|
url: string;
|
|
69
|
+
/** Populated when `kind === "search"` — the original list of queries. */
|
|
70
|
+
queries?: string[];
|
|
27
71
|
provider: string;
|
|
72
|
+
/**
|
|
73
|
+
* Present only when a fallback was used. Holds the provider that was
|
|
74
|
+
* initially selected by the router before the chain rolled over.
|
|
75
|
+
*/
|
|
76
|
+
fallback_from?: string;
|
|
28
77
|
credits_used: number;
|
|
29
78
|
data: ExtractionRecord[];
|
|
30
79
|
pagination: {
|
|
@@ -40,9 +89,11 @@ export interface ProviderInfo {
|
|
|
40
89
|
id: string;
|
|
41
90
|
name: string;
|
|
42
91
|
description: string;
|
|
43
|
-
status:
|
|
92
|
+
status: ProviderStatus;
|
|
44
93
|
supported_platforms: Platform[];
|
|
45
94
|
supported_types: ExtractionType[];
|
|
95
|
+
/** Search-style services supported by this provider, if any. */
|
|
96
|
+
supported_search_types?: SearchType[];
|
|
46
97
|
}
|
|
47
98
|
export interface ProviderDetail extends ProviderInfo {
|
|
48
99
|
pricing: {
|
|
@@ -50,6 +101,12 @@ export interface ProviderDetail extends ProviderInfo {
|
|
|
50
101
|
platforms: Platform[];
|
|
51
102
|
price_per_record: number;
|
|
52
103
|
}[];
|
|
104
|
+
/** Pricing for search-style services, keyed by SearchType. */
|
|
105
|
+
search_pricing?: {
|
|
106
|
+
type: SearchType;
|
|
107
|
+
platforms: Platform[];
|
|
108
|
+
price_per_record: number;
|
|
109
|
+
}[];
|
|
53
110
|
}
|
|
54
111
|
export interface AccountBalance {
|
|
55
112
|
balance: number;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"m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AC,CAAC;CACrF;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socialrouter/sdk",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Official TypeScript SDK for the SocialRouter API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,13 +11,28 @@
|
|
|
11
11
|
"import": "./dist/index.js"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
-
"files": [
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
15
19
|
"scripts": {
|
|
16
20
|
"build": "tsc",
|
|
17
21
|
"dev": "tsc --watch",
|
|
18
22
|
"prepublishOnly": "npm run build"
|
|
19
23
|
},
|
|
20
|
-
"keywords": [
|
|
24
|
+
"keywords": [
|
|
25
|
+
"socialrouter",
|
|
26
|
+
"social-media",
|
|
27
|
+
"scraping",
|
|
28
|
+
"api",
|
|
29
|
+
"sdk",
|
|
30
|
+
"linkedin",
|
|
31
|
+
"instagram",
|
|
32
|
+
"twitter",
|
|
33
|
+
"x",
|
|
34
|
+
"reddit"
|
|
35
|
+
],
|
|
21
36
|
"author": "SocialRouter",
|
|
22
37
|
"license": "MIT",
|
|
23
38
|
"homepage": "https://www.socialrouter.io",
|