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.
Query Parameters:
- authorization *Specify authorization for site
(e.g., authorization="<API-KEY>"). - 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://svgtile.com/static-rendering"). - key *Pagerun relies on html class as Anchor key
(e.g., "iAmRandomSelectorClassPublicKey") where class="iAmRandomSelectorClassPublicKey".
POST
This endpoint provides rendered html for the requested url for page.
require 'net/http'
require 'uri'
require 'json'
def fetch_data
# API configuration
base_url = 'https://pagerun.api.svgtile.com/v1'
params = {
'region' => 'YOUR_REGION' # Replace with actual region value
}
headers = {
'Content-Type' => 'application/json',
}
query_params = {"api":"NO","park":"month"}
begin
# Build URL
url = base_url
["region"].each do |param|
url += "/#{URI.encode_www_form_component(params[param])}"
end
# Add query parameters
uri = URI(url)
uri.query = URI.encode_www_form(query_params)
# Create HTTP client
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'
# Create request
request = case 'POST'
when 'POST'
Net::HTTP::Post.new(uri)
when 'PUT'
Net::HTTP::Put.new(uri)
when 'DELETE'
Net::HTTP::Delete.new(uri)
else
Net::HTTP::Get.new(uri)
end
# Set body for POST/PUT requests
if ['POST', 'PUT'].include?('POST')
request.body = {"task":"render|screenshot|serialize","key":"<selector-here>","link":"<url-here>"}.to_json
end
# Send request
response = http.request(request)
# Check for errors
unless response.is_a?(Net::HTTPSuccess)
raise "HTTP error! status: #{response.code}"
end
JSON.parse(response.body)
rescue StandardError => e
puts "Error: #{e.message}"
nil
end
end
# Example usage
result = fetch_data
puts JSON.pretty_generate(result) if resultSuggested 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://svgtile.com/pagerun" style="color: transparent;">PageRun SSR</a>
</div>