PageRun SSR API Documentation
No matter how fast your web pages are, when Google has to render your pages it'll still negatively affect your page speed scores and Core Web Vitals (CWV). SSR generates a fully rendered and functional HTML version of your URLs and serves them to search engines in 0.01 seconds on average. This boost in loading speed gets your CWV scores to near perfect.
Below are the endpoints for accessing web pages. Learn how to integrate the API into your application.
Authorization:
- privateId *Specify privateId for site
(e.g., "Bearer example^com-SomeIdString").
Query Parameters:
- park *Set TestPark/OmniPark redirection duration
(e.g., "1000ms | 10000ms | 100000ms | 1000000ms | 10000000ms | 100000000ms | 1000000000ms | 10000000000ms | 1m | hour | day | week | bimonthly | month | triannual | quarter | biannual | year"). - api *Does page include external api call
(e.g., "NO|YES"). - path Default path=api if !path passed
(e.g., "api") to wait for "/api/" has to be flat single word.
Route Parameters:
- :region *Please check location table here
(e.g., "WEST_3|ARAB_1|EAST_3|NORD_6").
Body Parameters:
- agent Track agent activity with FREE record keeping
Optional (e.g., "agent" = req.headers['user-agent']) - task *Specify which process to run
(e.g., "render"|"screenshot"|"serialize"). - link *Specify which page url to load
(e.g., "https://svgmine.com/static-rendering"). - key *Pagerun relies on html class as Anchor key
(e.g., "iAmRandomSelectorClassPublicKey") where class="iAmRandomSelectorClassPublicKey".
This endpoint provides rendered html for the requested url for page.
package main import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" ) func main() { result, err := fetchData() if err != nil { fmt.Printf("Error: %v\n", err) return } prettyJSON, _ := json.MarshalIndent(result, "", " ") fmt.Println(string(prettyJSON)) } func fetchData() (map[string]interface{}, error) { // API configuration baseURL := "https://pagerun.api.svgmine.com/v1" params := map[string]string{ "region": "YOUR_REGION", // Replace with actual region value } headers := map[string]string{ "Content-Type": "application/json", "Authorization": "Bearer <privateId>", } queryParams := {"api":"NO","park":"month"} // Build URL urlBuilder, err := url.Parse(baseURL) if err != nil { return nil, err } // Add path parameters pathParams := ["region"] path := urlBuilder.Path for _, param := range pathParams { path += "/" + url.PathEscape(params[param]) } urlBuilder.Path = path // Add query parameters q := urlBuilder.Query() for key, value := range queryParams { q.Add(key, value) } urlBuilder.RawQuery = q.Encode() // Create request body for POST/PUT var reqBody []byte if "POST" == "POST" || "POST" == "PUT" { reqBody, err = json.Marshal({"task":"render|screenshot|serialize","key":"<selector-here>","link":"<url-here>"}) if err != nil { return nil, err } } // Create request req, err := http.NewRequest("POST", urlBuilder.String(), bytes.NewBuffer(reqBody)) if err != nil { return nil, err } // Set headers for key, value := range headers { req.Header.Set(key, value) } // Send request client := &http.Client{} resp, err := client.Do(req) if err != nil { return nil, err } defer resp.Body.Close() // Check for errors if resp.StatusCode >= 400 { return nil, fmt.Errorf("HTTP error! status: %d", resp.StatusCode) } // Read response body, err := ioutil.ReadAll(resp.Body) if err != nil { return nil, err } // Parse JSON response var result map[string]interface{} err = json.Unmarshal(body, &result) if err != nil { return nil, err } return result, nil }
Suggested Selector for interface stealth
<div class="iAmRandomSelectorClassPublicKey"
style="line-height: 8px; font-size: 3px; padding: 0 4px; background: transparent; display: inline-block; position: absolute; bottom: 0; left: 28px;">
<a href="https://svgmine.com/pagerun" style="color: transparent;">PageRun SSR</a>
</div>