Scavio provides a REST API that you can call from any Java 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.
import java.net.http.*;
import java.net.URI;
var apiKey = "your_scavio_api_key";
var body = "{\"query\":\"" + query + "\"}";
var request = HttpRequest.newBuilder()
.uri(URI.create("https://api.scavio.dev/api/v1/search"))
.header("x-api-key", apiKey)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
var client = HttpClient.newHttpClient();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Amazon Search
Product search with prices, ratings, and reviews.
import java.net.http.*;
import java.net.URI;
var apiKey = "your_scavio_api_key";
var body = "{\"query\":\"" + query + "\",\"marketplace\":\"us\"}";
var request = HttpRequest.newBuilder()
.uri(URI.create("https://api.scavio.dev/api/v1/amazon/search"))
.header("x-api-key", apiKey)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
var client = HttpClient.newHttpClient();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Reddit Search
Community, posts & threaded comments from any subreddit.
import java.net.http.*;
import java.net.URI;
var apiKey = "your_scavio_api_key";
var body = "{\"query\":\"" + query + "\",\"sort\":\"new\"}";
var request = HttpRequest.newBuilder()
.uri(URI.create("https://api.scavio.dev/api/v1/reddit/search"))
.header("x-api-key", apiKey)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
var client = HttpClient.newHttpClient();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());YouTube Search
Video search with transcripts and metadata.
import java.net.http.*;
import java.net.URI;
var apiKey = "your_scavio_api_key";
var body = "{\"query\":\"" + query + "\"}";
var request = HttpRequest.newBuilder()
.uri(URI.create("https://api.scavio.dev/api/v1/youtube/search"))
.header("x-api-key", apiKey)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
var client = HttpClient.newHttpClient();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Walmart Search
Product search with pricing and fulfillment data.
import java.net.http.*;
import java.net.URI;
var apiKey = "your_scavio_api_key";
var body = "{\"query\":\"" + query + "\"}";
var request = HttpRequest.newBuilder()
.uri(URI.create("https://api.scavio.dev/api/v1/walmart/search"))
.header("x-api-key", apiKey)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
var client = HttpClient.newHttpClient();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());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
- Quickstart guide — get your API key and make your first request
- Rate limits — understand credit usage and limits
- Error reference — full list of error codes and troubleshooting