location reads a page from another country and asks the site for the languages you want. headers sends your own request headers to the site. These fields change what the site shows you, so a read that uses headers, location.languages or skipTlsVerification is always live.
Make a request
Get an API key in the Quickstart. This request reads a page that echoes the headers it received, from Germany, in German, with one custom header.Read the response
The page lists the headers it got. Two of them are the ones you sent: the languages, best first, and yourx-plan header. This real response is cut to those two headers.
Options
Headers
- Send at most 30 headers.
- A name uses letters, digits and
-, up to 64 characters. A value is up to 2,000 printable characters with no line breaks. Host,Content-Length,Connection,Transfer-Encoding,Upgrade,TEandProxy-Authorizationare refused, because Stophy sets them itself.- Your Stophy API key belongs in the
Authorizationheader of your request to Stophy, not inheaders. - Send
CookieorAuthorizationonly for a site you are allowed to read as that user.
Limits and errors
- A country that is not a two-letter code returns
400 invalidRequestwith the messagecountry: Expected a two-letter country code such as DE. - The country is a request. A site can still show the same page to everyone.
- A read with
headers,location.languagesorskipTlsVerificationis never answered from a stored copy and never saved as one. See Freshness and caching. - A refused header returns
400 invalidRequestwith the messageStophy sets this header itself.
Price
$1 per 1,000 pages. A country, languages, headers andskipTlsVerification add nothing.
Related
- Waiting and rendering reads a page as a phone would.
- Browser actions work with the same location.
- Freshness and caching explains when a stored copy is used.
- Scrape overview lists every format and option.