• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
std

std

fetch

Public
Like
2
fetch
Home
Code
5
README.md
database.ts
main.ts
H
proxy.ts
test.ts
Connections
Environment variables
1
Branches
1
Pull requests
Remixes
1
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
…
Viewing readonly version of main branch: v14
View latest version
README.md

std/fetch — Proxied Fetch

Drop-in replacement for JavaScript fetch() that routes requests through rotating proxy IPs via ScraperAPI.

Each request gets a different IP address, useful for scraping and accessing content that blocks datacenter IPs.

Usage

import { fetch } from "https://esm.town/v/std/fetch/main.ts"; const res = await fetch("https://httpbin.org/ip"); const json = await res.json(); console.log(json.origin); // A different IP each time

Same signature as native fetch().

How It Works

Rendering mermaid diagram...

Files

FileTypePurpose
main.tsscriptSDK — exports fetch()
proxy.tshttpAuth, rate limit, proxy, log
database.tsscriptSQLite logging + rate limiting

Environment Variables

KeyDescription
ScraperAPI_KEYScraperAPI API key

Rate Limiting

100 requests per minute per user. Returns 429 with Retry-After: 60 header when exceeded.

Usage Tracking

Every request logged to fetch_usage table (indexed on user_id, created_at) with user_id, username, url, method, status_code, timestamp.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
AboutAlternativesPricingBlogNewsletterCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.