mcp-scraper 0.40.1 → 0.40.2
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 +1 -1
- package/dist/bin/api-server.cjs +60220 -0
- package/dist/bin/api-server.cjs.map +1 -0
- package/dist/bin/api-server.d.cts +1 -0
- package/dist/bin/api-server.d.ts +1 -0
- package/dist/bin/api-server.js +38 -0
- package/dist/bin/api-server.js.map +1 -0
- package/dist/bin/mcp-scraper-cli.cjs +2671 -0
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -0
- package/dist/bin/mcp-scraper-cli.d.cts +1 -0
- package/dist/bin/mcp-scraper-cli.d.ts +1 -0
- package/dist/bin/mcp-scraper-cli.js +742 -0
- package/dist/bin/mcp-scraper-cli.js.map +1 -0
- package/dist/bin/mcp-scraper-install.cjs +129 -0
- package/dist/bin/mcp-scraper-install.cjs.map +1 -0
- package/dist/bin/mcp-scraper-install.d.cts +1 -0
- package/dist/bin/mcp-scraper-install.d.ts +1 -0
- package/dist/bin/mcp-scraper-install.js +27 -0
- package/dist/bin/mcp-scraper-install.js.map +1 -0
- package/dist/bin/mcp-stdio-server.cjs +12532 -0
- package/dist/bin/mcp-stdio-server.cjs.map +1 -0
- package/dist/bin/mcp-stdio-server.d.cts +1 -0
- package/dist/bin/mcp-stdio-server.d.ts +1 -0
- package/dist/bin/mcp-stdio-server.js +135 -0
- package/dist/bin/mcp-stdio-server.js.map +1 -0
- package/dist/bin/paa-harvest.cjs +3808 -0
- package/dist/bin/paa-harvest.cjs.map +1 -0
- package/dist/bin/paa-harvest.d.cts +1 -0
- package/dist/bin/paa-harvest.d.ts +1 -0
- package/dist/bin/paa-harvest.js +44 -0
- package/dist/bin/paa-harvest.js.map +1 -0
- package/dist/chunk-345BQXZH.js +712 -0
- package/dist/chunk-345BQXZH.js.map +1 -0
- package/dist/chunk-3PIWJS6Y.js +276 -0
- package/dist/chunk-3PIWJS6Y.js.map +1 -0
- package/dist/chunk-44HZLHDV.js +52 -0
- package/dist/chunk-44HZLHDV.js.map +1 -0
- package/dist/chunk-7XBBFBYY.js +3410 -0
- package/dist/chunk-7XBBFBYY.js.map +1 -0
- package/dist/chunk-CB5C3BPB.js +135 -0
- package/dist/chunk-CB5C3BPB.js.map +1 -0
- package/dist/chunk-FQI5PFE7.js +1866 -0
- package/dist/chunk-FQI5PFE7.js.map +1 -0
- package/dist/chunk-G3P3ZDB4.js +69 -0
- package/dist/chunk-G3P3ZDB4.js.map +1 -0
- package/dist/chunk-GUVKHCKE.js +3050 -0
- package/dist/chunk-GUVKHCKE.js.map +1 -0
- package/dist/chunk-K443GQY5.js +24 -0
- package/dist/chunk-K443GQY5.js.map +1 -0
- package/dist/chunk-LP6E462I.js +11555 -0
- package/dist/chunk-LP6E462I.js.map +1 -0
- package/dist/chunk-NVXNEOUQ.js +158 -0
- package/dist/chunk-NVXNEOUQ.js.map +1 -0
- package/dist/chunk-QZXKQB7Y.js +414 -0
- package/dist/chunk-QZXKQB7Y.js.map +1 -0
- package/dist/chunk-SBLGBZZB.js +647 -0
- package/dist/chunk-SBLGBZZB.js.map +1 -0
- package/dist/chunk-X2LKCX6H.js +499 -0
- package/dist/chunk-X2LKCX6H.js.map +1 -0
- package/dist/chunk-XELSA2MS.js +108 -0
- package/dist/chunk-XELSA2MS.js.map +1 -0
- package/dist/chunk-XORPNO3Z.js +684 -0
- package/dist/chunk-XORPNO3Z.js.map +1 -0
- package/dist/chunk-ZUJLSICT.js +7 -0
- package/dist/chunk-ZUJLSICT.js.map +1 -0
- package/dist/db-W3CP562I.js +239 -0
- package/dist/db-W3CP562I.js.map +1 -0
- package/dist/editorial-reading-room/assets/app.js +335 -0
- package/dist/editorial-reading-room/assets/index.html +131 -0
- package/dist/editorial-reading-room/assets/styles.css +1052 -0
- package/dist/extract-bundle-K4PG3RZJ.js +568 -0
- package/dist/extract-bundle-K4PG3RZJ.js.map +1 -0
- package/dist/index.cjs +4160 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +413 -0
- package/dist/index.d.ts +413 -0
- package/dist/index.js +338 -0
- package/dist/index.js.map +1 -0
- package/dist/location-data-repository-RLQX6SNM.js +35 -0
- package/dist/location-data-repository-RLQX6SNM.js.map +1 -0
- package/dist/server-KM3CFWCF.js +34674 -0
- package/dist/server-KM3CFWCF.js.map +1 -0
- package/dist/site-extract-repository-2SMMFKKL.js +62 -0
- package/dist/site-extract-repository-2SMMFKKL.js.map +1 -0
- package/dist/worker-FXAGFYOE.js +142 -0
- package/dist/worker-FXAGFYOE.js.map +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
// src/api/rates.ts
|
|
2
|
+
var MC_COSTS = {
|
|
3
|
+
serp: 400,
|
|
4
|
+
serp_headless: 400,
|
|
5
|
+
serp_headful: 1400,
|
|
6
|
+
paa: 300,
|
|
7
|
+
paa_base: 5500,
|
|
8
|
+
page_scrape: 100,
|
|
9
|
+
url_map: 500,
|
|
10
|
+
yt_channel: 200,
|
|
11
|
+
yt_transcription: 200,
|
|
12
|
+
fb_ad: 700,
|
|
13
|
+
maps_search: 500,
|
|
14
|
+
maps_place: 6e3,
|
|
15
|
+
maps_review: 100,
|
|
16
|
+
fb_search: 800,
|
|
17
|
+
fb_search_result: 100,
|
|
18
|
+
fb_page_intel: 700,
|
|
19
|
+
fb_page_intel_ad: 50,
|
|
20
|
+
fb_transcribe: 33300,
|
|
21
|
+
google_ads_search: 600,
|
|
22
|
+
google_ads_intel: 200,
|
|
23
|
+
google_ads_transcribe: 33300,
|
|
24
|
+
instagram_profile: 400,
|
|
25
|
+
instagram_media: 400,
|
|
26
|
+
instagram_transcribe: 33300,
|
|
27
|
+
browser_minute: 12e3,
|
|
28
|
+
reddit_thread: 3e3,
|
|
29
|
+
reddit_comment: 200,
|
|
30
|
+
video_analysis: 666700,
|
|
31
|
+
trustpilot_reviews: 500,
|
|
32
|
+
trustpilot_review: 100,
|
|
33
|
+
g2_reviews: 500,
|
|
34
|
+
g2_review: 200,
|
|
35
|
+
diff_page: 100
|
|
36
|
+
};
|
|
37
|
+
function serpActualCostMc(headlessSent) {
|
|
38
|
+
return headlessSent === true ? MC_COSTS.serp_headless : MC_COSTS.serp_headful;
|
|
39
|
+
}
|
|
40
|
+
var MC_PER_BROWSER_MS = MC_COSTS.browser_minute / 6e4;
|
|
41
|
+
function browserActiveCostMc(activeMs) {
|
|
42
|
+
return Math.round(activeMs * MC_PER_BROWSER_MS);
|
|
43
|
+
}
|
|
44
|
+
var BROWSER_OPEN_MIN_BALANCE_MC = 1e3;
|
|
45
|
+
var MC_PER_CREDIT = 100;
|
|
46
|
+
var BILLING_MC_PER_USD_NUMERATOR = 2e6;
|
|
47
|
+
var BILLING_MC_PER_USD_DENOMINATOR = 3;
|
|
48
|
+
var BILLING_BASIS_POINTS = 1e4;
|
|
49
|
+
var USD_NANOS = 1e9;
|
|
50
|
+
var SCHEDULED_RUN_BASE_CREDITS = 75;
|
|
51
|
+
var SCHEDULED_RUN_BASE_MC = SCHEDULED_RUN_BASE_CREDITS * MC_PER_CREDIT;
|
|
52
|
+
var SCHEDULED_AGENT_LLM_MARKUP_BPS = 15e3;
|
|
53
|
+
var SCHEDULED_AGENT_LLM_MARKUP = SCHEDULED_AGENT_LLM_MARKUP_BPS / BILLING_BASIS_POINTS;
|
|
54
|
+
var SCHEDULED_RUN_DEFAULT_MAX_CREDITS = 5e3;
|
|
55
|
+
var CONNECTED_USAGE_RATE_POLICY_VERSION = "2026-07-23.connected-usage-v2";
|
|
56
|
+
var CONNECTED_ACTIVE_CONNECTION_MONTHLY_CREDITS = 15e3;
|
|
57
|
+
var CONNECTED_ACTIVE_CONNECTION_MONTHLY_MC = CONNECTED_ACTIVE_CONNECTION_MONTHLY_CREDITS * MC_PER_CREDIT;
|
|
58
|
+
var CONNECTED_FUNCTION_RUN_CREDITS = 1.5;
|
|
59
|
+
var CONNECTED_PROXY_REQUEST_CREDITS = 1.5;
|
|
60
|
+
var CONNECTED_COMPUTE_CREDITS_PER_SECOND = 3;
|
|
61
|
+
var CONNECTED_FUNCTION_RUN_MC = CONNECTED_FUNCTION_RUN_CREDITS * MC_PER_CREDIT;
|
|
62
|
+
var CONNECTED_PROXY_REQUEST_MC = CONNECTED_PROXY_REQUEST_CREDITS * MC_PER_CREDIT;
|
|
63
|
+
var CONNECTED_COMPUTE_MC_PER_SECOND = CONNECTED_COMPUTE_CREDITS_PER_SECOND * MC_PER_CREDIT;
|
|
64
|
+
var CONNECTED_USAGE_RATE_POLICY = {
|
|
65
|
+
schemaVersion: 2,
|
|
66
|
+
ratePolicyVersion: CONNECTED_USAGE_RATE_POLICY_VERSION,
|
|
67
|
+
effectiveAt: "2026-07-23T00:00:00.000Z",
|
|
68
|
+
provider: "nango",
|
|
69
|
+
entitlement: "paid_plan_add_on",
|
|
70
|
+
connection: {
|
|
71
|
+
billingMode: "flat_recurring_credits",
|
|
72
|
+
amountCredits: CONNECTED_ACTIVE_CONNECTION_MONTHLY_CREDITS,
|
|
73
|
+
interval: "month",
|
|
74
|
+
unit: "active_connection",
|
|
75
|
+
proration: "none"
|
|
76
|
+
},
|
|
77
|
+
usage: {
|
|
78
|
+
billingMode: "credits",
|
|
79
|
+
settlementMode: "authoritative_receipt",
|
|
80
|
+
rounding: "aggregate_then_ceil_to_mc",
|
|
81
|
+
functionRun: {
|
|
82
|
+
credits: CONNECTED_FUNCTION_RUN_CREDITS,
|
|
83
|
+
mc: CONNECTED_FUNCTION_RUN_MC,
|
|
84
|
+
unit: "per_function_run"
|
|
85
|
+
},
|
|
86
|
+
proxyRequest: {
|
|
87
|
+
credits: CONNECTED_PROXY_REQUEST_CREDITS,
|
|
88
|
+
mc: CONNECTED_PROXY_REQUEST_MC,
|
|
89
|
+
unit: "per_proxy_request"
|
|
90
|
+
},
|
|
91
|
+
compute: {
|
|
92
|
+
creditsPerSecond: CONNECTED_COMPUTE_CREDITS_PER_SECOND,
|
|
93
|
+
mcPerSecond: CONNECTED_COMPUTE_MC_PER_SECOND,
|
|
94
|
+
sourceUnit: "millisecond",
|
|
95
|
+
unit: "per_compute_second",
|
|
96
|
+
formula: "ceil(computeMilliseconds * mcPerSecond / 1000)"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
function nonNegativeSafeInteger(value, field) {
|
|
101
|
+
if (!Number.isSafeInteger(value) || value < 0) {
|
|
102
|
+
throw new Error(`${field} must be a non-negative safe integer`);
|
|
103
|
+
}
|
|
104
|
+
return BigInt(value);
|
|
105
|
+
}
|
|
106
|
+
function safeMc(value) {
|
|
107
|
+
if (value > BigInt(Number.MAX_SAFE_INTEGER)) throw new Error("connected usage charge exceeds the safe integer range");
|
|
108
|
+
return Number(value);
|
|
109
|
+
}
|
|
110
|
+
function calculateConnectedUsageCharge(usage) {
|
|
111
|
+
const functionRuns = nonNegativeSafeInteger(usage.functionRuns, "functionRuns");
|
|
112
|
+
const proxyRequests = nonNegativeSafeInteger(usage.proxyRequests, "proxyRequests");
|
|
113
|
+
const computeMilliseconds = nonNegativeSafeInteger(usage.computeMilliseconds, "computeMilliseconds");
|
|
114
|
+
const functionRunMc = functionRuns * BigInt(CONNECTED_FUNCTION_RUN_MC);
|
|
115
|
+
const proxyRequestMc = proxyRequests * BigInt(CONNECTED_PROXY_REQUEST_MC);
|
|
116
|
+
const computeNumerator = computeMilliseconds * BigInt(CONNECTED_COMPUTE_MC_PER_SECOND);
|
|
117
|
+
const computeMc = computeNumerator === 0n ? 0n : (computeNumerator + 999n) / 1000n;
|
|
118
|
+
const amountMc = functionRunMc + proxyRequestMc + computeMc;
|
|
119
|
+
return {
|
|
120
|
+
functionRunMc: safeMc(functionRunMc),
|
|
121
|
+
proxyRequestMc: safeMc(proxyRequestMc),
|
|
122
|
+
computeMc: safeMc(computeMc),
|
|
123
|
+
amountMc: safeMc(amountMc),
|
|
124
|
+
credits: safeMc(amountMc) / MC_PER_CREDIT
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
var SCHEDULED_ACTIONS_RATE_POLICY = {
|
|
128
|
+
billingMode: "credits",
|
|
129
|
+
entitlement: "paid_plan_included",
|
|
130
|
+
separateSubscriptionRequired: false,
|
|
131
|
+
chargeEvent: "started_occurrence",
|
|
132
|
+
runBaseCredits: SCHEDULED_RUN_BASE_CREDITS,
|
|
133
|
+
runBaseMc: SCHEDULED_RUN_BASE_MC,
|
|
134
|
+
llmCostMultiplier: SCHEDULED_AGENT_LLM_MARKUP,
|
|
135
|
+
llmCostMultiplierBps: SCHEDULED_AGENT_LLM_MARKUP_BPS,
|
|
136
|
+
modes: {
|
|
137
|
+
connection_sync: {
|
|
138
|
+
runBaseCredits: SCHEDULED_RUN_BASE_CREDITS,
|
|
139
|
+
modelCostBilling: "none",
|
|
140
|
+
modelCostMultiplier: 0
|
|
141
|
+
},
|
|
142
|
+
agent: {
|
|
143
|
+
runBaseCredits: SCHEDULED_RUN_BASE_CREDITS,
|
|
144
|
+
modelCostBilling: "actual_reported_cost",
|
|
145
|
+
modelCostProvider: "openrouter",
|
|
146
|
+
modelCostMultiplier: SCHEDULED_AGENT_LLM_MARKUP,
|
|
147
|
+
modelCostMultiplierBps: SCHEDULED_AGENT_LLM_MARKUP_BPS
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
function vendorCostUsdToMc(costUsd, markupBps) {
|
|
152
|
+
if (!Number.isFinite(costUsd) || costUsd < 0) throw new Error("costUsd must be a finite non-negative number");
|
|
153
|
+
if (!Number.isInteger(markupBps) || markupBps < 0) throw new Error("markupBps must be a non-negative integer");
|
|
154
|
+
const rawCostNanos = BigInt(Math.round(costUsd * USD_NANOS));
|
|
155
|
+
const numerator = rawCostNanos * BigInt(markupBps) * BigInt(BILLING_MC_PER_USD_NUMERATOR);
|
|
156
|
+
const denominator = BigInt(USD_NANOS) * BigInt(BILLING_BASIS_POINTS) * BigInt(BILLING_MC_PER_USD_DENOMINATOR);
|
|
157
|
+
const mc = numerator === 0n ? 0n : (numerator + denominator - 1n) / denominator;
|
|
158
|
+
if (mc > BigInt(Number.MAX_SAFE_INTEGER)) throw new Error("calculated mc exceeds the safe integer range");
|
|
159
|
+
return Number(mc);
|
|
160
|
+
}
|
|
161
|
+
var CREDIT_COST_CATALOG = [
|
|
162
|
+
{
|
|
163
|
+
key: "serp",
|
|
164
|
+
label: "SERP search",
|
|
165
|
+
aliases: ["search_serp", "serp", "google search", "organic results"],
|
|
166
|
+
credits: mcToCredits(MC_COSTS.serp_headless),
|
|
167
|
+
unit: "per search (headless); escalates to headful only when needed",
|
|
168
|
+
notes: `Returns AI Overview, PAA snippet, videos, forums, and local pack. Billed ${mcToCredits(MC_COSTS.serp_headless)} credits when served headless (the common case), ${mcToCredits(MC_COSTS.serp_headful)} credits if an anti-bot escalation forces headful mode (overestimate refunded). Optional SERP Intelligence page snapshots add ${mcToCredits(MC_COSTS.page_scrape)} credit per attempted URL.`
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
key: "paa",
|
|
172
|
+
label: "PAA harvest",
|
|
173
|
+
aliases: ["harvest_paa", "paa", "people also ask", "questions"],
|
|
174
|
+
credits: mcToCredits(MC_COSTS.paa),
|
|
175
|
+
unit: `per question (+${mcToCredits(MC_COSTS.paa_base)} credit base)`,
|
|
176
|
+
notes: `Full SERP feature extraction. Billed ${mcToCredits(MC_COSTS.paa_base)} credit base + ${mcToCredits(MC_COSTS.paa)} per question actually returned (unused estimate refunded).`
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
key: "page_scrape",
|
|
180
|
+
label: "Page crawl / extract",
|
|
181
|
+
aliases: ["extract_url", "extract_site", "page scrape", "url scrape", "single page", "site crawl"],
|
|
182
|
+
credits: mcToCredits(MC_COSTS.page_scrape),
|
|
183
|
+
unit: "per page",
|
|
184
|
+
notes: "Applies to both single-URL extraction and per-page site crawls."
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
key: "url_map",
|
|
188
|
+
label: "Site URL mapping",
|
|
189
|
+
aliases: ["map_site_urls", "url map", "site map", "crawl urls"],
|
|
190
|
+
credits: mcToCredits(MC_COSTS.url_map),
|
|
191
|
+
unit: "per mapping operation",
|
|
192
|
+
notes: "Flat rate for the full /map-urls call regardless of URL count discovered."
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
key: "yt_channel",
|
|
196
|
+
label: "YouTube search / channel harvest",
|
|
197
|
+
aliases: ["youtube_harvest", "youtube search", "youtube channel", "yt_channel"],
|
|
198
|
+
credits: mcToCredits(MC_COSTS.yt_channel),
|
|
199
|
+
unit: "per call"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
key: "yt_transcription",
|
|
203
|
+
label: "YouTube transcription",
|
|
204
|
+
aliases: ["youtube_transcribe", "youtube transcript", "transcription", "yt_transcription"],
|
|
205
|
+
credits: mcToCredits(2e4),
|
|
206
|
+
unit: "base + 2/min of video",
|
|
207
|
+
notes: "Flat 200-credit base plus 2 credits per minute of video, reconciled to the real video length after transcription (e.g. a 10-minute video is about 220 credits)."
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
key: "fb_ad",
|
|
211
|
+
label: "Facebook search / ad lookup",
|
|
212
|
+
aliases: ["facebook_page_intel", "facebook_ad_search", "facebook_ad", "facebook ads", "fb ads"],
|
|
213
|
+
credits: mcToCredits(MC_COSTS.fb_ad),
|
|
214
|
+
unit: "per call"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
key: "maps_search",
|
|
218
|
+
label: "Maps business search",
|
|
219
|
+
aliases: ["maps_search", "google maps search", "gmb search", "gbp search", "business profiles"],
|
|
220
|
+
credits: mcToCredits(MC_COSTS.maps_search),
|
|
221
|
+
unit: "per search",
|
|
222
|
+
notes: "Returns up to 50 Google Maps business/profile candidates. Use maps_place_intel to hydrate selected businesses."
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
key: "maps_place",
|
|
226
|
+
label: "Maps business lookup",
|
|
227
|
+
aliases: ["maps_place_intel", "google maps", "maps place", "place intel"],
|
|
228
|
+
credits: mcToCredits(MC_COSTS.maps_place),
|
|
229
|
+
unit: "per business",
|
|
230
|
+
notes: "Base lookup. Reviews billed separately per card at maps_review rate."
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
key: "maps_review",
|
|
234
|
+
label: "Maps review",
|
|
235
|
+
aliases: ["maps_reviews", "google reviews", "review cards", "reviews"],
|
|
236
|
+
credits: mcToCredits(MC_COSTS.maps_review),
|
|
237
|
+
unit: "per review card",
|
|
238
|
+
notes: "Charged after extraction when includeReviews is true."
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
key: "fb_search",
|
|
242
|
+
label: "Facebook ad library search",
|
|
243
|
+
aliases: ["facebook_search", "fb_search", "fb ad search"],
|
|
244
|
+
credits: mcToCredits(MC_COSTS.fb_search),
|
|
245
|
+
unit: "per search",
|
|
246
|
+
notes: "Browser automation to search Facebook Ads Library by keyword."
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
key: "google_ads_search",
|
|
250
|
+
label: "Google Ads Transparency search",
|
|
251
|
+
aliases: ["google_ads_search", "google ads search", "ads transparency search"],
|
|
252
|
+
credits: mcToCredits(MC_COSTS.google_ads_search),
|
|
253
|
+
unit: "per search",
|
|
254
|
+
notes: "Browser automation to find advertisers in Google Ads Transparency Center by domain or name."
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
key: "google_ads_intel",
|
|
258
|
+
label: "Google Ads Transparency advertiser intel",
|
|
259
|
+
aliases: ["google_ads_page_intel", "google ads intel", "ads transparency intel"],
|
|
260
|
+
credits: mcToCredits(MC_COSTS.google_ads_intel),
|
|
261
|
+
unit: "per call",
|
|
262
|
+
notes: "Lists and hydrates an advertiser's creatives with image URLs and video references."
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
key: "google_ads_transcribe",
|
|
266
|
+
label: "Google ad video transcription",
|
|
267
|
+
aliases: ["google_ads_transcribe", "google ad transcript"],
|
|
268
|
+
credits: mcToCredits(2e4),
|
|
269
|
+
unit: "base + 2/min of video",
|
|
270
|
+
notes: "Flat 200-credit base plus 2 credits per minute of video, reconciled to the real video length after transcription (e.g. a 10-minute video is about 220 credits)."
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
key: "fb_transcribe",
|
|
274
|
+
label: "Facebook video / ad transcription",
|
|
275
|
+
aliases: ["facebook_transcribe", "facebook_video_transcribe", "fb_transcribe", "fb ad transcript"],
|
|
276
|
+
credits: mcToCredits(2e4),
|
|
277
|
+
unit: "base + 2/min of video",
|
|
278
|
+
notes: "Flat 200-credit base plus 2 credits per minute of video, reconciled to the real video length after transcription (e.g. a 10-minute video is about 220 credits)."
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
key: "instagram_profile",
|
|
282
|
+
label: "Instagram profile content discovery",
|
|
283
|
+
aliases: ["instagram_profile_content", "instagram profile", "instagram content list", "ig profile"],
|
|
284
|
+
credits: mcToCredits(MC_COSTS.instagram_profile),
|
|
285
|
+
unit: "per profile scan",
|
|
286
|
+
notes: "Browser extraction of public Instagram profile grid links. Complete history may require a logged-in profile."
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
key: "instagram_media",
|
|
290
|
+
label: "Instagram media download",
|
|
291
|
+
aliases: ["instagram_media_download", "instagram reel download", "instagram post download", "ig media"],
|
|
292
|
+
credits: mcToCredits(MC_COSTS.instagram_media),
|
|
293
|
+
unit: "per post or reel",
|
|
294
|
+
notes: "Extracts post text, image URLs, and reel audio/video tracks, with local downloads when the server can write files."
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
key: "instagram_transcribe",
|
|
298
|
+
label: "Instagram media transcription",
|
|
299
|
+
aliases: ["instagram transcript", "instagram reel transcript", "ig transcribe"],
|
|
300
|
+
credits: mcToCredits(2e4),
|
|
301
|
+
unit: "base + 2/min of video",
|
|
302
|
+
notes: "Whisper transcription of selected Instagram audio/video media. Flat 200-credit base plus 2 credits per minute of video, reconciled to the real video length after transcription (e.g. a 10-minute video is about 220 credits)."
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
key: "browser_minute",
|
|
306
|
+
label: "Interactive browser session",
|
|
307
|
+
aliases: ["browser_open", "browser agent", "browser_agent", "live browser", "browse", "browser control", "interactive browser"],
|
|
308
|
+
credits: mcToCredits(MC_COSTS.browser_minute),
|
|
309
|
+
unit: "per minute of use",
|
|
310
|
+
notes: "Metered per minute of use for the whole time the browser session is open. Close the session to stop the meter; abandoned sessions are auto-closed after a short idle window."
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
key: "reddit_thread",
|
|
314
|
+
label: "Reddit thread base lookup",
|
|
315
|
+
aliases: ["reddit", "reddit_thread", "reddit comments", "subreddit", "reddit post"],
|
|
316
|
+
credits: mcToCredits(MC_COSTS.reddit_thread),
|
|
317
|
+
unit: "per thread",
|
|
318
|
+
notes: "Base lookup for the post itself. Comments billed separately per comment at reddit_comment rate. Refunded if the thread cannot be retrieved."
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
key: "reddit_comment",
|
|
322
|
+
label: "Reddit comment",
|
|
323
|
+
aliases: ["reddit_comment", "reddit comments"],
|
|
324
|
+
credits: mcToCredits(MC_COSTS.reddit_comment),
|
|
325
|
+
unit: "per comment",
|
|
326
|
+
notes: "Charged per comment actually extracted, billed down automatically if the balance runs out mid-thread."
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
key: "video_analysis",
|
|
330
|
+
label: "Video breakdown (frame-by-frame + transcript)",
|
|
331
|
+
aliases: ["video_frame_analysis", "video breakdown", "video analysis", "analyze video"],
|
|
332
|
+
credits: mcToCredits(MC_COSTS.video_analysis),
|
|
333
|
+
unit: "per 120 frames (max 480)",
|
|
334
|
+
notes: "Full multi-lens video breakdown: samples frames across a video (up to 30 minutes), analyzes each with vision AI, transcribes the audio, then produces summary, pacing/energy, words-per-minute, topic outline, key points, hook analysis, visual style, and a how-to-replicate recipe with a quality-control pass. $1 per 120 frames requested (max 480 = $4); billed down automatically if the video cannot use the requested frames, and refunded fully if the run fails."
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
key: "trustpilot_reviews",
|
|
338
|
+
label: "Trustpilot review harvest",
|
|
339
|
+
aliases: ["trustpilot_reviews", "trustpilot", "trustpilot reviews"],
|
|
340
|
+
credits: mcToCredits(MC_COSTS.trustpilot_reviews),
|
|
341
|
+
unit: "per call",
|
|
342
|
+
notes: "Base lookup. Reviews billed separately per card at trustpilot_review rate. Refunded if no reviews are found."
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
key: "trustpilot_review",
|
|
346
|
+
label: "Trustpilot review card",
|
|
347
|
+
aliases: ["trustpilot_review", "trustpilot card"],
|
|
348
|
+
credits: mcToCredits(MC_COSTS.trustpilot_review),
|
|
349
|
+
unit: "per review card",
|
|
350
|
+
notes: "Charged per review actually extracted, billed down automatically if the balance runs out mid-page."
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
key: "g2_reviews",
|
|
354
|
+
label: "G2 review harvest",
|
|
355
|
+
aliases: ["g2_reviews", "g2", "g2 reviews"],
|
|
356
|
+
credits: mcToCredits(MC_COSTS.g2_reviews),
|
|
357
|
+
unit: "per call",
|
|
358
|
+
notes: "Base lookup. Reviews billed separately per card at g2_review rate. Refunded if no reviews are found."
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
key: "g2_review",
|
|
362
|
+
label: "G2 review card",
|
|
363
|
+
aliases: ["g2_review", "g2 card"],
|
|
364
|
+
credits: mcToCredits(MC_COSTS.g2_review),
|
|
365
|
+
unit: "per review card",
|
|
366
|
+
notes: "Charged per review actually extracted (each card carries up to 3 Q&A sections), billed down automatically if the balance runs out mid-page."
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
key: "diff_page",
|
|
370
|
+
label: "Page change check",
|
|
371
|
+
aliases: ["diff_page", "page diff", "change detection"],
|
|
372
|
+
credits: mcToCredits(MC_COSTS.diff_page),
|
|
373
|
+
unit: "per check",
|
|
374
|
+
notes: "Same cost as a single page extract \u2014 one scrape is performed per check, then compared against your last stored snapshot for that URL."
|
|
375
|
+
}
|
|
376
|
+
];
|
|
377
|
+
var CONCURRENCY_PRICE_ID = "price_1Ta1NRS8aAcsk3TGwsRnYbix";
|
|
378
|
+
function tierBillingInterval(tier) {
|
|
379
|
+
return tier.billing_interval ?? "month";
|
|
380
|
+
}
|
|
381
|
+
function tierAmountChargedUsd(tier) {
|
|
382
|
+
return tier.billed_usd ?? tier.monthly_usd;
|
|
383
|
+
}
|
|
384
|
+
function tierCreditsPerInterval(tier) {
|
|
385
|
+
return tier.credits_mc / MC_PER_CREDIT;
|
|
386
|
+
}
|
|
387
|
+
var SUBSCRIPTION_TIERS = {
|
|
388
|
+
"price_1TmiHRS8aAcsk3TGwmSNfNIa": { tier: "starter", label: "Starter", price_id: "price_1TmiHRS8aAcsk3TGwmSNfNIa", monthly_usd: 12, credits_mc: 8e6, concurrency: 3, intro_coupon: "mcp-starter-1dollar-intro-12" },
|
|
389
|
+
"price_1TrgihS8aAcsk3TG5cglrq4D": { tier: "growth", label: "Growth", price_id: "price_1TrgihS8aAcsk3TG5cglrq4D", monthly_usd: 40, credits_mc: 26666700, concurrency: 10, intro_coupon: null },
|
|
390
|
+
"price_1TrgihS8aAcsk3TG4HnG4gbY": { tier: "scale", label: "Scale", price_id: "price_1TrgihS8aAcsk3TG4HnG4gbY", monthly_usd: 100, credits_mc: 8e7, concurrency: 20, intro_coupon: null },
|
|
391
|
+
"price_1TwqIVS8aAcsk3TG0FE3ddDM": { tier: "sonic", label: "Sonic Annual", price_id: "price_1TwqIVS8aAcsk3TG0FE3ddDM", monthly_usd: 25, billed_usd: 300, credits_mc: 25e7, concurrency: 3, intro_coupon: null, billing_interval: "year", credits_never_expire: true, private_offer: true },
|
|
392
|
+
"price_1TwqIWS8aAcsk3TGbGbtlLak": { tier: "sonic-memory", label: "Sonic Annual + Memory Pro", price_id: "price_1TwqIWS8aAcsk3TGbGbtlLak", monthly_usd: 34.5, billed_usd: 414, credits_mc: 25e7, concurrency: 3, intro_coupon: null, billing_interval: "year", credits_never_expire: true, includes_memory: true, private_offer: true }
|
|
393
|
+
};
|
|
394
|
+
var SUBSCRIPTION_TIER_BY_KEY = Object.fromEntries(
|
|
395
|
+
Object.values(SUBSCRIPTION_TIERS).map((t) => [t.tier, t])
|
|
396
|
+
);
|
|
397
|
+
var PRIVATE_OFFERS = {
|
|
398
|
+
sonic: {
|
|
399
|
+
slug: "sonic",
|
|
400
|
+
label: "Sonic annual partner offer",
|
|
401
|
+
headline: "A full year of MCP Scraper, with Credits that never expire.",
|
|
402
|
+
tier_keys: ["sonic", "sonic-memory"]
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
function offerClaimPathForTier(tierKey) {
|
|
406
|
+
const offer = Object.values(PRIVATE_OFFERS).find((o) => o.tier_keys.includes(tierKey));
|
|
407
|
+
return offer ? `/${offer.slug}/claim` : null;
|
|
408
|
+
}
|
|
409
|
+
function offerForTier(tierKey) {
|
|
410
|
+
if (!tierKey) return null;
|
|
411
|
+
return Object.values(PRIVATE_OFFERS).find((o) => o.tier_keys.includes(tierKey)) ?? null;
|
|
412
|
+
}
|
|
413
|
+
function tierChangeLeavesPrivateOffer(fromTier, toTier) {
|
|
414
|
+
const from = offerForTier(fromTier);
|
|
415
|
+
if (!from) return false;
|
|
416
|
+
return !from.tier_keys.includes(toTier);
|
|
417
|
+
}
|
|
418
|
+
function getSubscriptionPlanView(tierKey) {
|
|
419
|
+
if (!tierKey) return null;
|
|
420
|
+
const tier = SUBSCRIPTION_TIER_BY_KEY[tierKey];
|
|
421
|
+
if (!tier) return null;
|
|
422
|
+
return {
|
|
423
|
+
tier: tier.tier,
|
|
424
|
+
label: tier.label,
|
|
425
|
+
amount_usd: tierAmountChargedUsd(tier),
|
|
426
|
+
interval: tierBillingInterval(tier),
|
|
427
|
+
monthly_equivalent_usd: tier.monthly_usd,
|
|
428
|
+
credits_per_interval: tierCreditsPerInterval(tier),
|
|
429
|
+
concurrency: tier.concurrency,
|
|
430
|
+
credits_never_expire: !!tier.credits_never_expire,
|
|
431
|
+
includes_memory: !!tier.includes_memory,
|
|
432
|
+
private_offer: !!tier.private_offer,
|
|
433
|
+
offer_claim_path: offerClaimPathForTier(tier.tier)
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
function getPrivateOfferPayload(slug) {
|
|
437
|
+
const offer = PRIVATE_OFFERS[slug];
|
|
438
|
+
if (!offer) return null;
|
|
439
|
+
const options = offer.tier_keys.map((key) => SUBSCRIPTION_TIER_BY_KEY[key]).filter((t) => !!t).map((t) => ({
|
|
440
|
+
tier: t.tier,
|
|
441
|
+
label: t.label,
|
|
442
|
+
amount_usd: tierAmountChargedUsd(t),
|
|
443
|
+
interval: tierBillingInterval(t),
|
|
444
|
+
monthly_equivalent_usd: t.monthly_usd,
|
|
445
|
+
credits: tierCreditsPerInterval(t),
|
|
446
|
+
credits_never_expire: !!t.credits_never_expire,
|
|
447
|
+
includes_memory: !!t.includes_memory,
|
|
448
|
+
concurrency: t.concurrency
|
|
449
|
+
}));
|
|
450
|
+
if (!options.length) return null;
|
|
451
|
+
return { slug: offer.slug, label: offer.label, headline: offer.headline, options };
|
|
452
|
+
}
|
|
453
|
+
function getPublicRatesPayload() {
|
|
454
|
+
const starter = SUBSCRIPTION_TIER_BY_KEY.starter;
|
|
455
|
+
const costs = CREDIT_COST_CATALOG.map(({ aliases, ...cost }) => ({
|
|
456
|
+
...cost,
|
|
457
|
+
...cost.notes ? { notes: cost.notes.replace(/ via fal\.ai/g, "") } : {}
|
|
458
|
+
}));
|
|
459
|
+
return {
|
|
460
|
+
creditsPerDollarStarter: Math.round(mcToCredits(starter.credits_mc) / starter.monthly_usd),
|
|
461
|
+
costs,
|
|
462
|
+
scheduling: SCHEDULED_ACTIONS_RATE_POLICY,
|
|
463
|
+
connectedAccounts: CONNECTED_USAGE_RATE_POLICY
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
var CONCURRENCY_SLOT_PRICE_USD = 5;
|
|
467
|
+
var CONCURRENCY_SLOT_PRICE_CURRENCY = "usd";
|
|
468
|
+
var CONCURRENCY_SLOT_PRICE_INTERVAL = "month";
|
|
469
|
+
var CONCURRENCY_SLOT_PRICE_LABEL = "$5/month";
|
|
470
|
+
var CONCURRENCY_SLOT_TERMINAL_COMMAND = "npx -y -p mcp-scraper@latest mcp-scraper-cli billing concurrency checkout";
|
|
471
|
+
function concurrencySlotBillingInfo() {
|
|
472
|
+
const billingUrl = process.env.CONCURRENCY_BILLING_URL ?? "https://mcpscraper.dev/billing";
|
|
473
|
+
return {
|
|
474
|
+
product: "Extra concurrency slot",
|
|
475
|
+
price_label: CONCURRENCY_SLOT_PRICE_LABEL,
|
|
476
|
+
unit_amount_usd: CONCURRENCY_SLOT_PRICE_USD,
|
|
477
|
+
currency: CONCURRENCY_SLOT_PRICE_CURRENCY,
|
|
478
|
+
interval: CONCURRENCY_SLOT_PRICE_INTERVAL,
|
|
479
|
+
billing_url: billingUrl,
|
|
480
|
+
terminal_command: CONCURRENCY_SLOT_TERMINAL_COMMAND,
|
|
481
|
+
terminal_command_with_api_key_env: `MCP_SCRAPER_API_KEY=sk_live_your_key ${CONCURRENCY_SLOT_TERMINAL_COMMAND}`
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
function mcToCredits(mc) {
|
|
485
|
+
return mc / MC_PER_CREDIT;
|
|
486
|
+
}
|
|
487
|
+
function insufficientBalanceResponse(balanceMc, requiredMc) {
|
|
488
|
+
const topupUrl = process.env.TOPUP_URL ?? "https://mcpscraper.dev/billing";
|
|
489
|
+
const balanceCredits = mcToCredits(balanceMc);
|
|
490
|
+
const requiredCredits = mcToCredits(requiredMc);
|
|
491
|
+
return {
|
|
492
|
+
error: "insufficient_balance",
|
|
493
|
+
error_code: "insufficient_balance",
|
|
494
|
+
message: `Insufficient credits. Balance: ${balanceCredits} credits. This call requires ${requiredCredits} credits. Top up at ${topupUrl}`,
|
|
495
|
+
balance_credits: balanceCredits,
|
|
496
|
+
required_credits: requiredCredits,
|
|
497
|
+
topup_url: topupUrl
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
var MEMORY_FREE_QUOTA_BYTES = 1e7 * 1;
|
|
501
|
+
var MEMORY_PLANS = {
|
|
502
|
+
"price_1TnMSTS8aAcsk3TGBgiwuvqL": { plan: "pro", label: "Pro", price_id: "price_1TnMSTS8aAcsk3TGBgiwuvqL", interval: "month", monthly_usd: 19, quota_bytes: 5e9 },
|
|
503
|
+
"price_1TnMSTS8aAcsk3TGWBVU2agY": { plan: "pro", label: "Pro", price_id: "price_1TnMSTS8aAcsk3TGWBVU2agY", interval: "year", monthly_usd: 19, quota_bytes: 5e9 }
|
|
504
|
+
};
|
|
505
|
+
var MEMORY_PLAN_QUOTA = { free: MEMORY_FREE_QUOTA_BYTES, pro: 5e9, team: 5e10 };
|
|
506
|
+
var MEMORY_MARGIN_MULTIPLE = 3;
|
|
507
|
+
var MEMORY_PRO_COST_BUDGET_USD = 19 / MEMORY_MARGIN_MULTIPLE;
|
|
508
|
+
var LedgerOperation = {
|
|
509
|
+
TOPUP: "topup",
|
|
510
|
+
SUBSCRIPTION: "subscription",
|
|
511
|
+
SIGNUP_GRANT: "signup_grant",
|
|
512
|
+
MONTHLY_REFRESH: "monthly_free_refresh",
|
|
513
|
+
PAA: "paa",
|
|
514
|
+
PAA_REFUND: "paa_refund",
|
|
515
|
+
SERP: "serp",
|
|
516
|
+
SERP_REFUND: "serp_refund",
|
|
517
|
+
REFUND: "refund",
|
|
518
|
+
TRANSCRIPTION: "transcription",
|
|
519
|
+
TRANSCRIPTION_HOLD: "transcription_hold",
|
|
520
|
+
TRANSCRIPTION_REFUND: "transcription_refund",
|
|
521
|
+
YT_CHANNEL: "yt_channel",
|
|
522
|
+
FB_AD: "fb_ad",
|
|
523
|
+
MAPS_SEARCH: "maps_search",
|
|
524
|
+
DIRECTORY_WORKFLOW_HOLD: "directory_workflow_hold",
|
|
525
|
+
DIRECTORY_WORKFLOW_REFUND: "directory_workflow_refund",
|
|
526
|
+
MAPS_PLACE: "maps_place",
|
|
527
|
+
MAPS_REVIEW: "maps_review",
|
|
528
|
+
MAPS_REVIEW_REFUND: "maps_review_refund",
|
|
529
|
+
EXTRACT_SITE: "extract_site",
|
|
530
|
+
EXTRACT_SITE_REFUND: "extract_site_refund",
|
|
531
|
+
EXTRACT_URL: "page_scrape",
|
|
532
|
+
URL_MAP: "url_map",
|
|
533
|
+
EXTRACT_SITE_HOLD: "extract_site_hold",
|
|
534
|
+
YT_CHANNEL_REFUND: "yt_channel_refund",
|
|
535
|
+
FB_AD_REFUND: "fb_ad_refund",
|
|
536
|
+
URL_MAP_REFUND: "url_map_refund",
|
|
537
|
+
FB_SEARCH: "fb_search",
|
|
538
|
+
FB_TRANSCRIBE: "fb_transcribe",
|
|
539
|
+
FB_SEARCH_REFUND: "fb_search_refund",
|
|
540
|
+
FB_SEARCH_RESULT: "fb_search_result",
|
|
541
|
+
FB_SEARCH_RESULT_REFUND: "fb_search_result_refund",
|
|
542
|
+
FB_PAGE_INTEL: "fb_page_intel",
|
|
543
|
+
FB_PAGE_INTEL_REFUND: "fb_page_intel_refund",
|
|
544
|
+
FB_PAGE_INTEL_AD: "fb_page_intel_ad",
|
|
545
|
+
FB_PAGE_INTEL_AD_REFUND: "fb_page_intel_ad_refund",
|
|
546
|
+
FB_TRANSCRIBE_REFUND: "fb_transcribe_refund",
|
|
547
|
+
GOOGLE_ADS_SEARCH: "google_ads_search",
|
|
548
|
+
GOOGLE_ADS_SEARCH_REFUND: "google_ads_search_refund",
|
|
549
|
+
GOOGLE_ADS_INTEL: "google_ads_intel",
|
|
550
|
+
GOOGLE_ADS_INTEL_REFUND: "google_ads_intel_refund",
|
|
551
|
+
GOOGLE_ADS_TRANSCRIBE: "google_ads_transcribe",
|
|
552
|
+
GOOGLE_ADS_TRANSCRIBE_REFUND: "google_ads_transcribe_refund",
|
|
553
|
+
INSTAGRAM_PROFILE: "instagram_profile",
|
|
554
|
+
INSTAGRAM_PROFILE_REFUND: "instagram_profile_refund",
|
|
555
|
+
INSTAGRAM_MEDIA: "instagram_media",
|
|
556
|
+
INSTAGRAM_MEDIA_REFUND: "instagram_media_refund",
|
|
557
|
+
INSTAGRAM_TRANSCRIBE: "instagram_transcribe",
|
|
558
|
+
INSTAGRAM_TRANSCRIBE_REFUND: "instagram_transcribe_refund",
|
|
559
|
+
BROWSER_SESSION: "browser_session",
|
|
560
|
+
REDDIT_THREAD: "reddit_thread",
|
|
561
|
+
REDDIT_THREAD_REFUND: "reddit_thread_refund",
|
|
562
|
+
REDDIT_COMMENT: "reddit_comment",
|
|
563
|
+
REDDIT_COMMENT_REFUND: "reddit_comment_refund",
|
|
564
|
+
VIDEO_ANALYSIS: "video_analysis",
|
|
565
|
+
VIDEO_ANALYSIS_REFUND: "video_analysis_refund",
|
|
566
|
+
VIDEO_ANALYSIS_ADJUST: "video_analysis_adjust",
|
|
567
|
+
VIDEO_ANALYSIS_LLM: "video_analysis_llm",
|
|
568
|
+
MEMORY_AI: "memory_ai",
|
|
569
|
+
MEMORY_AI_REFUND: "memory_ai_refund",
|
|
570
|
+
TRUSTPILOT_REVIEWS: "trustpilot_reviews",
|
|
571
|
+
TRUSTPILOT_REVIEWS_REFUND: "trustpilot_reviews_refund",
|
|
572
|
+
TRUSTPILOT_REVIEW: "trustpilot_review",
|
|
573
|
+
TRUSTPILOT_REVIEW_REFUND: "trustpilot_review_refund",
|
|
574
|
+
G2_REVIEWS: "g2_reviews",
|
|
575
|
+
G2_REVIEWS_REFUND: "g2_reviews_refund",
|
|
576
|
+
G2_REVIEW: "g2_review",
|
|
577
|
+
G2_REVIEW_REFUND: "g2_review_refund",
|
|
578
|
+
DIFF_PAGE: "diff_page",
|
|
579
|
+
DIFF_PAGE_REFUND: "diff_page_refund",
|
|
580
|
+
SITE_AUDIT_LLM: "site_audit_llm",
|
|
581
|
+
SCHEDULED_RUN: "scheduled_run",
|
|
582
|
+
CONNECTED_USAGE: "connected_usage",
|
|
583
|
+
CONNECTED_ACCOUNT_FEE: "connected_account_fee",
|
|
584
|
+
ADMIN_GRANT: "admin_grant",
|
|
585
|
+
ADMIN_REVOKE: "admin_revoke"
|
|
586
|
+
};
|
|
587
|
+
var MEMORY_AI_MARGIN_MULTIPLE = 3;
|
|
588
|
+
var SITE_AUDIT_LLM_MARGIN_MULTIPLE = 1.5;
|
|
589
|
+
var VIDEO_ANALYSIS_LLM_MARGIN_MULTIPLE = 1.5;
|
|
590
|
+
var MEDIA_TRANSCRIBE_FLAT_MC = 2e4;
|
|
591
|
+
var MEDIA_TRANSCRIBE_PER_MIN_MC = 200;
|
|
592
|
+
function mediaTranscribeChargeMc(durationSecs) {
|
|
593
|
+
const mins = Math.max(1, Math.ceil((durationSecs || 60) / 60));
|
|
594
|
+
return MEDIA_TRANSCRIBE_FLAT_MC + MEDIA_TRANSCRIBE_PER_MIN_MC * mins;
|
|
595
|
+
}
|
|
596
|
+
var MEDIA_TRANSCRIBE_HOLD_MC = MEDIA_TRANSCRIBE_FLAT_MC + MEDIA_TRANSCRIBE_PER_MIN_MC * 30;
|
|
597
|
+
var MC_PER_USD = SUBSCRIPTION_TIERS["price_1TmiHRS8aAcsk3TGwmSNfNIa"].credits_mc / SUBSCRIPTION_TIERS["price_1TmiHRS8aAcsk3TGwmSNfNIa"].monthly_usd;
|
|
598
|
+
|
|
599
|
+
export {
|
|
600
|
+
MC_COSTS,
|
|
601
|
+
serpActualCostMc,
|
|
602
|
+
browserActiveCostMc,
|
|
603
|
+
BROWSER_OPEN_MIN_BALANCE_MC,
|
|
604
|
+
MC_PER_CREDIT,
|
|
605
|
+
USD_NANOS,
|
|
606
|
+
SCHEDULED_RUN_BASE_CREDITS,
|
|
607
|
+
SCHEDULED_RUN_BASE_MC,
|
|
608
|
+
SCHEDULED_AGENT_LLM_MARKUP_BPS,
|
|
609
|
+
SCHEDULED_AGENT_LLM_MARKUP,
|
|
610
|
+
SCHEDULED_RUN_DEFAULT_MAX_CREDITS,
|
|
611
|
+
CONNECTED_USAGE_RATE_POLICY_VERSION,
|
|
612
|
+
CONNECTED_ACTIVE_CONNECTION_MONTHLY_CREDITS,
|
|
613
|
+
CONNECTED_ACTIVE_CONNECTION_MONTHLY_MC,
|
|
614
|
+
CONNECTED_FUNCTION_RUN_CREDITS,
|
|
615
|
+
CONNECTED_PROXY_REQUEST_CREDITS,
|
|
616
|
+
CONNECTED_COMPUTE_CREDITS_PER_SECOND,
|
|
617
|
+
CONNECTED_FUNCTION_RUN_MC,
|
|
618
|
+
CONNECTED_USAGE_RATE_POLICY,
|
|
619
|
+
calculateConnectedUsageCharge,
|
|
620
|
+
vendorCostUsdToMc,
|
|
621
|
+
CREDIT_COST_CATALOG,
|
|
622
|
+
CONCURRENCY_PRICE_ID,
|
|
623
|
+
tierBillingInterval,
|
|
624
|
+
tierAmountChargedUsd,
|
|
625
|
+
tierCreditsPerInterval,
|
|
626
|
+
SUBSCRIPTION_TIERS,
|
|
627
|
+
SUBSCRIPTION_TIER_BY_KEY,
|
|
628
|
+
offerClaimPathForTier,
|
|
629
|
+
offerForTier,
|
|
630
|
+
tierChangeLeavesPrivateOffer,
|
|
631
|
+
getSubscriptionPlanView,
|
|
632
|
+
getPrivateOfferPayload,
|
|
633
|
+
getPublicRatesPayload,
|
|
634
|
+
concurrencySlotBillingInfo,
|
|
635
|
+
mcToCredits,
|
|
636
|
+
insufficientBalanceResponse,
|
|
637
|
+
MEMORY_PLANS,
|
|
638
|
+
MEMORY_PLAN_QUOTA,
|
|
639
|
+
LedgerOperation,
|
|
640
|
+
MEMORY_AI_MARGIN_MULTIPLE,
|
|
641
|
+
SITE_AUDIT_LLM_MARGIN_MULTIPLE,
|
|
642
|
+
VIDEO_ANALYSIS_LLM_MARGIN_MULTIPLE,
|
|
643
|
+
mediaTranscribeChargeMc,
|
|
644
|
+
MEDIA_TRANSCRIBE_HOLD_MC,
|
|
645
|
+
MC_PER_USD
|
|
646
|
+
};
|
|
647
|
+
//# sourceMappingURL=chunk-SBLGBZZB.js.map
|