Language examples for fastCRW's HTTP API without pretending official SDK packages already exist.
const res = await fetch("https://fastcrw.com/api/v1/scrape", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://example.com", formats: ["markdown"] }),
});
if (!res.ok) {
throw new Error(`fastCRW error: ${res.status}`);
}
const payload = await res.json();
console.log(payload.data?.markdown);
This is enough for most Node.js backends, server actions, and edge handlers.
import requests
res = requests.post(
"https://fastcrw.com/api/v1/scrape",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={"url": "https://example.com", "formats": ["markdown"]},
)
res.raise_for_status()
payload = res.json()
print(payload["data"]["markdown"])
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
body := []byte(`{"url":"https://example.com","formats":["markdown"]}`)
req, _ := http.NewRequest("POST", "https://fastcrw.com/api/v1/scrape", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
b, _ := io.ReadAll(res.Body)
fmt.Println(string(b))
}
Every language follows the same basic loop:
POST /crawl to start the job.GET /crawl/:id until the job reaches a terminal state.That is why the examples here stay close to raw HTTP instead of pretending there is an official SDK package.
Retry-After on 429.warning and metadata.statusCode, not just the HTTP status.scrape before wiring in crawl or extraction.