Developer guides
Use the official Git-tagged Go beta module from high-performance services, workers, API backends, and data pipelines.
Verified HTTP pattern
POST /google/search
Request
POST https://api.crawlora.net/api/v1/google/search
x-api-key: $CRAWLORA_API_KEY
Content-Type: application/json
{
"country": "us",
"keyword": "best CRM software",
"language": "en",
"limit": 10,
"page": 1
}Base URL
https://api.crawlora.net/api/v1
Auth header
x-api-key
Example endpoint
POST /google/search
The Go SDK is published from https://github.com/Crawlora-org/crawlora-go-sdk. Install the current promoted beta tag v1.5.0-sdk.3 and keep the module path pinned in production applications.
Developer workflow
Go consumers use the GitHub repository directly as the module path.
go get github.com/Crawlora-org/crawlora-go-sdk@v1.5.0-sdk.3
Developer workflow
export CRAWLORA_API_KEY="your_api_key_here"
Developer workflow
Use generated endpoint groups and typed endpoint variants from the Go module.
package main
import (
"context"
"fmt"
"os"
crawlora "github.com/Crawlora-org/crawlora-go-sdk"
)
func main() {
client := crawlora.NewClient(crawlora.WithAPIKey(os.Getenv("CRAWLORA_API_KEY")))
result, err := client.Bing.Search(context.Background(), crawlora.Params{
"q": "coffee shops",
"count": 10,
})
if err != nil {
panic(err)
}
fmt.Printf("%#v\n", result)
}Developer workflow
Use direct HTTP calls when you need a minimal dependency path or want to compare behavior with endpoint docs.
package main
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
"time"
)
const baseURL = "https://api.crawlora.net/api/v1"
type SearchRequest struct {
Country string `json:"country,omitempty"`
Keyword string `json:"keyword"`
Language string `json:"language,omitempty"`
Limit int `json:"limit,omitempty"`
Page int `json:"page,omitempty"`
}
type SearchResponse struct {
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
Result []struct {
Position int `json:"position,omitempty"`
Title string `json:"title,omitempty"`
Link string `json:"link,omitempty"`
Snippet string `json:"Snippet,omitempty"`
} `json:"result,omitempty"`
} `json:"data,omitempty"`
}
func crawloraRequest(ctx context.Context, client *http.Client, path string, payload any, out any) error {
apiKey := os.Getenv("CRAWLORA_API_KEY")
if apiKey == "" {
return fmt.Errorf("missing CRAWLORA_API_KEY")
}
body, err := json.Marshal(payload)
if err != nil {
return err
}
req, err := http.NewRequestWithContext(ctx, http.MethodPost, baseURL+path, bytes.NewReader(body))
if err != nil {
return err
}
req.Header.Set("x-api-key", apiKey)
req.Header.Set("Content-Type", "application/json")
resp, err := client.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()
respBody, err := io.ReadAll(resp.Body)
if err != nil {
return err
}
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
return fmt.Errorf("crawlora request failed: status=%d body=%s", resp.StatusCode, string(respBody))
}
return json.Unmarshal(respBody, out)
}
func main() {
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
defer cancel()
client := &http.Client{Timeout: 65 * time.Second}
var result SearchResponse
err := crawloraRequest(ctx, client, "/google/search", SearchRequest{
Country: "us",
Keyword: "best CRM software",
Language: "en",
Limit: 10,
Page: 1,
}, &result)
if err != nil {
panic(err)
}
fmt.Printf("%+v\n", result.Data.Result)
}Developer workflow
The SDK includes generated typed endpoint variants. You can still define narrow request and response structs around fields your service uses.
Developer workflow
Use bounded workers and context cancellation instead of unbounded goroutines.
type Job struct {
Keyword string
}
func worker(ctx context.Context, client *http.Client, jobs <-chan Job, results chan<- SearchResponse) {
for {
select {
case <-ctx.Done():
return
case job, ok := <-jobs:
if !ok {
return
}
var out SearchResponse
err := crawloraRequest(ctx, client, "/google/search", SearchRequest{
Keyword: job.Keyword,
Country: "us",
Language: "en",
Limit: 10,
Page: 1,
}, &out)
if err == nil {
results <- out
}
}
}
}Developer workflow
| Status / code | Meaning | How to handle |
|---|---|---|
| 400 | Invalid request or missing required input. | Validate request bodies before calling Crawlora and surface useful messages to users. |
| 401 | Missing or invalid API key. | Check the `x-api-key` header and rotate the key from the console if needed. |
| 402/403 | Plan, permission, or billing issue where applicable. | Check plan access, credit state, and endpoint availability. |
| 429 | Rate limit exceeded. | Back off with jitter and reduce concurrency. |
| 5xx | Temporary execution or upstream failure. | Retry safe jobs with exponential backoff and keep the failure visible. |
Developer workflow
Use Crawlora for structured public web data workflows. Customers are responsible for compliance with applicable laws, third-party rights, platform rules, and Crawlora terms. Keep API keys server-side, validate inputs, and avoid collecting or storing unnecessary sensitive data.
Read Crawlora termsDeveloper workflow
Use these pages to move between endpoint discovery, examples, pricing, and responsible-use guidance.
Developer workflow
Common questions for this Crawlora developer integration path.
Yes. The official Go beta SDK module is published at https://github.com/Crawlora-org/crawlora-go-sdk. Install it with go get and an explicit tag such as v1.5.0-sdk.3.
Yes. The example uses only net/http, context, encoding/json, and related standard packages.
Use context.WithTimeout for each request and reuse an http.Client with an appropriate Timeout.
Use a bounded worker pool and back off on 429 or temporary 5xx responses.
Yes. Crawlora fits queue workers and backend services when jobs are bounded and retry behavior is controlled.
Use the docs catalog and endpoint detail pages for request examples, parameters, and response schema references.
Use the console, pricing page, endpoint docs, and response context where available.
Pin the current module tag, set CRAWLORA_API_KEY, then place Crawlora calls behind your queue or API boundary.