TypeScript

Search API for TypeScript Developers

Search Google, Amazon, YouTube, Walmart, and Reddit from TypeScript using fetch. Structured JSON responses. Free tier included.

Scavio provides a REST API that you can call from any TypeScript application. Send a POST request with your query, get structured JSON back. Here is how to use every platform.

Google Search

Web search with knowledge graph, PAA, and AI overviews.

const API_KEY = "your_scavio_api_key";

interface GoogleResult {
  search_metadata: { status: string };
  organic_results: Array<{ position: number; title: string; link: string; snippet: string }>;
}

const response = await fetch("https://api.scavio.dev/api/v1/search", {
  method: "POST",
  headers: {
    "x-api-key": API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ query }),
});

const data: GoogleResult = await response.json();
for (const result of data.organic_results?.slice(0, 5) ?? []) {
  console.log(`${result.position}. ${result.title}`);
  console.log(`   ${result.link}\n`);
}

Amazon Search

Product search with prices, ratings, and reviews.

const API_KEY = "your_scavio_api_key";

interface AmazonResult {
  search_metadata: { status: string };
  products: Array<{ position: number; title: string; price: string; rating: number; reviews_count: number }>;
}

const response = await fetch("https://api.scavio.dev/api/v1/amazon/search", {
  method: "POST",
  headers: {
    "x-api-key": API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ query, marketplace: "us" }),
});

const data: AmazonResult = await response.json();
for (const product of data.products?.slice(0, 5) ?? []) {
  console.log(`${product.title} — ${product.price} (${product.rating}⭐)`);
}

Reddit Search

Community, posts & threaded comments from any subreddit.

const API_KEY = "your_scavio_api_key";

interface RedditResult {
  search_metadata: { status: string };
  data: { searchQuery: string; totalResults: number; nextCursor: string | null; posts: Array<{ position: number; id: string; title: string; url: string; subreddit: string; author: string; timestamp: string; nsfw: boolean }> };
}

const response = await fetch("https://api.scavio.dev/api/v1/reddit/search", {
  method: "POST",
  headers: {
    "x-api-key": API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ query, sort: "new" }),
});

const data: RedditResult = await response.json();
for (const post of data.data?.posts?.slice(0, 5) ?? []) {
  console.log(`r/${post.subreddit} — ${post.title}`);
  console.log(`   by u/${post.author}`);
}

YouTube Search

Video search with transcripts and metadata.

const API_KEY = "your_scavio_api_key";

interface YouTubeResult {
  search_metadata: { status: string };
  videos: Array<{ position: number; title: string; video_id: string; channel: string; views: number }>;
}

const response = await fetch("https://api.scavio.dev/api/v1/youtube/search", {
  method: "POST",
  headers: {
    "x-api-key": API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ query }),
});

const data: YouTubeResult = await response.json();
for (const video of data.videos?.slice(0, 5) ?? []) {
  console.log(`${video.title} — ${video.views} views`);
}

Walmart Search

Product search with pricing and fulfillment data.

const API_KEY = "your_scavio_api_key";

interface WalmartResult {
  search_metadata: { status: string };
  products: Array<{ position: number; title: string; price: string; rating: number; reviews_count: number }>;
}

const response = await fetch("https://api.scavio.dev/api/v1/walmart/search", {
  method: "POST",
  headers: {
    "x-api-key": API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ query }),
});

const data: WalmartResult = await response.json();
for (const product of data.products?.slice(0, 5) ?? []) {
  console.log(`${product.title} — ${product.price} (${product.rating}⭐)`);
}

Error Handling

The API returns standard HTTP status codes. Check for 200 (success), 401 (invalid API key), 429 (rate limit), and 500 (server error). The response body always includes a descriptive error message.

Next Steps

Frequently Asked Questions

Send a POST request to the Scavio API endpoint using fetch. Include your API key in the x-api-key header and your search query in the JSON body. The API returns structured JSON that you can parse directly.

Yes, install fetch with: npm install typescript tsx. After that, you can make API calls to Scavio.

Scavio supports Google (web, news, images, shopping, maps), Amazon (12 marketplaces), YouTube (search, transcripts, metadata), and Walmart. All platforms use the same authentication and return structured JSON.

Scavio uses a simple REST API that works with any HTTP client. No framework-specific SDK is needed — use fetch to make POST requests and parse the JSON response.

Check the HTTP status code: 200 means success, 401 means invalid API key, 429 means rate limit exceeded, and 500 means a server error. The response body includes an error message with details. See the error handling example above.

Start Building with TypeScript

Get your free Scavio API key and search Google, Amazon, YouTube, Walmart, and Reddit from TypeScript. 500 free credits/month.