Basic request
The simplest Web Scraping API call takes just two parameters: your api_key and the target url. The API responds with the raw HTML of the page, plus a few custom response headers that describe the request.
Endpoint
Section titled “Endpoint” GET https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | Your Web Scraping API key |
url | string | yes | Target URL to fetch |
Custom response headers
Section titled “Custom response headers”The API adds a few WSA- prefixed response headers to every successful scrape.
| Header | Description |
|---|---|
WSA-Client-Cookies | JavaScript-generated cookies set after the target page loaded. |
WSA-Scraped-Headers | Response headers returned by the scraped URL. |
WSA-Scraped-Resolved-Url | Final URL after any redirects. |
WSA-Call-Credit-Usage | Credits consumed by this request. |
WSA-Current-Credit-Usage | Your total credit usage after this request. |
Example request
Section titled “Example request”curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https://example.com"import requests
r = requests.get("https://scrape.shifter.io/v1", params={ "api_key": "YOUR_API_KEY", "url": "https://example.com",})print(r.text)import fetch from 'node-fetch';
const url = 'https://scrape.shifter.io/v1?' + new URLSearchParams({ api_key: 'YOUR_API_KEY', url: 'https://example.com',});const res = await fetch(url);console.log(await res.text());Example response
Section titled “Example response”<!doctype html><html><head> <title>Example Domain</title></head><body><div> <h1>Example Domain</h1> <p>This domain is for use in illustrative examples in documents.</p> <p><a href="https://www.iana.org/domains/example">More information...</a></p></div></body></html>See also
Section titled “See also”- API request - full parameter reference
- Rendering JavaScript
- API errors