Operia’s API is very simple to use. So easy that you can even run it from your browser!
All requests are sent to the following base URL:
where KEY is your personal API KEY.
Please read how to protect your API key below.
This is the main API: give us a URL and we’ll fetch it for you!
Your client must support HTTP redirections. CURL supports this by using the
curl -L 'https://run.operia.io/KEY/?url=https://example.com'
In PHP use the
|url||the URL of the page to fetch (make sure to URL-encode it)|
On success, the response body is the body of the requested URL.
The response headers are not preserved. Instead, the following response headers may be added:
|Operia-Cost||The actual cost the request took.|
|Operia-Original-Status-Code||The original status code reported by the fetched page.|
|Operia-Original-Content-Type||If the original |
|Operia-Original-Set-Cookie||If the fetched page attempted to set cookies, they will be specified here. This header may appear multiple times for multiple cookies.|
On failure, the response status code will be in the range of
4xx-5xx and the error string will be returned as the response body.
|REQUEST_FAILED||Failed sending request to the backend provider or parsing provider’s response. Feel free to resend the request, it may be served by a different provider next time. You will not be charged for the failed request.|
|REQUEST_TIMED_OUT||Provider did not respond in a timely manner. Feel free to resend the request, it may be served by a different provider next time. You will not be charged for the timed-out request.|
|CAPTCHA||A CAPTCHA challenge was detected in the fetched page. Feel free to resend the request, it may be served by a different provider next time. You will not be charged for this request.|
|NO_RESOURCES||Currently no provider is able to accept your request. Feel free to resend the request. You will not be charged for the unhandled request.|
|NO_CREDITS||Your account does not have enough credits to process the request. Please contact us for options.|
|INVALID_URL||The supplied URL is invalid. Make sure it includes the scheme (|
Want to check your account’s remaining credits?
Your remaining credits in USD.
Each request to the Fetcher API costs credits. The exact cost varies on the cheapest price which we are able to obtain for your request at run time. Since the price varies often, it is recommended to sample the Cost API periodically.
The request price in USD for requested destination.
Show usage statistics. Notice that statistics may take a few minutes to update.
|days||Filter statistics for the last X days (default=30)|
|pp=1||Human readable output (“pretty print”)|
A JSON formatted usage report, grouped by status code.
Since (most) requests to the API are performed using the HTTP GET method to a URL which includes your KEY, it’s relatively easy to expose it to unwanted parties. You should be aware of this when sharing constructed API links with peers.
Another point to consider is that most messaging platforms today attempt to generate preview of shared links, which would trigger a valid API call and charge credits from your account. For this reason it is recommended to avoid sending constructed API links which includes your KEY via these platforms.
If you believe your key has been compromised, please contact us right away and we will send you a new key.
A more secure authentication method also exists. If you’re interested in using it, please contact us.