Skip to main content

Resolved URL

Scraping Fish returns the final resolved URL after any redirects. This information can be found in the Resolved-Url header of the API response. Resolved URL is included in the response header every time and there is no additional parameter needed to enable it.

Example​

For URL http://google.com, Google redirects to HTTPS which is included in the response:

import requests

payload = {
"api_key": "[your API key]",
"url": "http://google.com",
}

response = requests.get("https://scraping.narf.ai/api/v1/", params=payload)
print(response.headers)

Response headers:

Content-Type: text/html; charset=utf-8
...
Resolved-Url: https://www.google.com/?gws_rd=ssl
...
Content-Length: 39