Go

Search API for Go Developers

Search Google, Amazon, YouTube, Walmart, and Reddit from Go using net/http. Structured JSON responses. Free tier included.

Scavio provides a REST API that you can call from any Go 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.

package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
)

func main() {
	apiKey := "your_scavio_api_key"

	body, _ := json.Marshal(map[string]interface{}{
		"query": query,
	})

	req, _ := http.NewRequest("POST", "https://api.scavio.dev/api/v1/search", bytes.NewBuffer(body))
	req.Header.Set("x-api-key", apiKey)
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	result, _ := io.ReadAll(resp.Body)

	var data map[string]interface{}
	json.Unmarshal(result, &data)
	formatted, _ := json.MarshalIndent(data, "", "  ")
	fmt.Println(string(formatted))
}

Amazon Search

Product search with prices, ratings, and reviews.

package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
)

func main() {
	apiKey := "your_scavio_api_key"

	body, _ := json.Marshal(map[string]interface{}{
		"query": query,
		"marketplace": "us",
	})

	req, _ := http.NewRequest("POST", "https://api.scavio.dev/api/v1/amazon/search", bytes.NewBuffer(body))
	req.Header.Set("x-api-key", apiKey)
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	result, _ := io.ReadAll(resp.Body)

	var data map[string]interface{}
	json.Unmarshal(result, &data)
	formatted, _ := json.MarshalIndent(data, "", "  ")
	fmt.Println(string(formatted))
}

Reddit Search

Community, posts & threaded comments from any subreddit.

package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
)

func main() {
	apiKey := "your_scavio_api_key"

	body, _ := json.Marshal(map[string]interface{}{
		"query": query,
		"sort": "new",
	})

	req, _ := http.NewRequest("POST", "https://api.scavio.dev/api/v1/reddit/search", bytes.NewBuffer(body))
	req.Header.Set("x-api-key", apiKey)
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	result, _ := io.ReadAll(resp.Body)

	var data map[string]interface{}
	json.Unmarshal(result, &data)
	formatted, _ := json.MarshalIndent(data, "", "  ")
	fmt.Println(string(formatted))
}

YouTube Search

Video search with transcripts and metadata.

package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
)

func main() {
	apiKey := "your_scavio_api_key"

	body, _ := json.Marshal(map[string]interface{}{
		"query": query,
	})

	req, _ := http.NewRequest("POST", "https://api.scavio.dev/api/v1/youtube/search", bytes.NewBuffer(body))
	req.Header.Set("x-api-key", apiKey)
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	result, _ := io.ReadAll(resp.Body)

	var data map[string]interface{}
	json.Unmarshal(result, &data)
	formatted, _ := json.MarshalIndent(data, "", "  ")
	fmt.Println(string(formatted))
}

Walmart Search

Product search with pricing and fulfillment data.

package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
)

func main() {
	apiKey := "your_scavio_api_key"

	body, _ := json.Marshal(map[string]interface{}{
		"query": query,
	})

	req, _ := http.NewRequest("POST", "https://api.scavio.dev/api/v1/walmart/search", bytes.NewBuffer(body))
	req.Header.Set("x-api-key", apiKey)
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	result, _ := io.ReadAll(resp.Body)

	var data map[string]interface{}
	json.Unmarshal(result, &data)
	formatted, _ := json.MarshalIndent(data, "", "  ")
	fmt.Println(string(formatted))
}

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 net/http. 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.

No. net/http is built into Go's standard library. You can start making API calls immediately.

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 net/http 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 Go

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