API Documentation
Prompt Engine
Store
- KV
- File
AI Scraper
Scrape any website instantly and get consistent structured data in seconds without writing any css selector code
import { JigsawStack } from "jigsawstack";
const jigsawstack = JigsawStack({
apiKey: "your-api-key",
});
const result = await jigsawstack.web.ai_scrape({
url: "https://supabase.com/pricing",
element_prompts: ["Plan title", "Plan price"],
});
{
"page_position": 1,
"page_position_length": 3,
"context": {
"Plan header": [
"Enterprise",
"Enterprise"
],
"Plan price": [
"Custom"
]
},
"selectors": {
"Plan header": [
"h3:contains('Free')",
"h3:contains('Pro')",
"h3:contains('Team')",
"h3:contains('Enterprise')"
],
"Plan price": [
"p.font-mono:contains('$0')",
"p.font-mono:contains('$25')",
"p.font-mono:contains('$599')",
"p.font-mono:contains('Custom')"
]
},
"link": [
{
"href": "https://supabase.com/dashboard/new?plan=free",
"text": "Start for Free"
},
{
"href": "https://supabase.com/dashboard/new?plan=pro",
"text": "Get Started"
},
{
"href": "https://supabase.com/pricing#addon-compute",
"text": "Need more compute?"
},
{
"href": "https://supabase.com/dashboard/new?plan=team",
"text": "Get Started"
},
{
"href": "https://supabase.com/pricing#addon-compute",
"text": "Need more compute?"
},
{
"href": "https://forms.supabase.com/enterprise",
"text": "Contact Us"
},
{
"href": "https://supabase.com/#compare-plans",
"text": "Compare Plans"
},
],
"data": [
{
"key": "Plan header",
"selector": "h3:contains('Free')",
"results": [
{
"html": "Free",
"text": "Free",
"attributes": [
{
"name": "class",
"value": "text-foreground text-2xl font-normal uppercase flex items-center gap-4 font-mono"
}
]
},
{
"html": "Free",
"text": "Free",
"attributes": [
{
"name": "class",
"value": "text-lg xl:text-xl 2xl:text-2xl leading-5 uppercase font-mono font-normal flex items-center"
}
]
}
]
},
{
"key": "Plan header",
"selector": "h3:contains('Pro')",
"results": [
{
"html": "Pro",
"text": "Pro",
"attributes": [
{
"name": "class",
"value": "text-foreground text-2xl font-normal uppercase flex items-center gap-4 font-mono"
}
]
},
{
"html": "Pro",
"text": "Pro",
"attributes": [
{
"name": "class",
"value": "text-lg xl:text-xl 2xl:text-2xl leading-5 uppercase font-mono font-normal flex items-center"
}
]
}
]
},
{
"key": "Plan header",
"selector": "h3:contains('Team')",
"results": [
{
"html": "Team",
"text": "Team",
"attributes": [
{
"name": "class",
"value": "text-foreground text-2xl font-normal uppercase flex items-center gap-4 font-mono"
}
]
},
{
"html": "Team",
"text": "Team",
"attributes": [
{
"name": "class",
"value": "text-lg xl:text-xl 2xl:text-2xl leading-5 uppercase font-mono font-normal flex items-center"
}
]
}
]
},
{
"key": "Plan header",
"selector": "h3:contains('Enterprise')",
"results": [
{
"html": "Enterprise",
"text": "Enterprise",
"attributes": [
{
"name": "class",
"value": "text-foreground text-2xl font-normal uppercase flex items-center gap-4 font-mono"
}
]
},
{
"html": "Enterprise",
"text": "Enterprise",
"attributes": [
{
"name": "class",
"value": "text-lg xl:text-xl 2xl:text-2xl leading-5 uppercase font-mono font-normal flex items-center"
}
]
}
]
},
{
"key": "Plan price",
"selector": "p.font-mono:contains('$0')",
"results": [
{
"html": "$0",
"text": "$0",
"attributes": [
{
"name": "class",
"value": "mt-2 pb-1 font-mono text-5xl"
}
]
}
]
},
{
"key": "Plan price",
"selector": "p.font-mono:contains('$25')",
"results": [
{
"html": "$25",
"text": "$25",
"attributes": [
{
"name": "class",
"value": "mt-2 pb-1 font-mono text-5xl"
}
]
}
]
},
{
"key": "Plan price",
"selector": "p.font-mono:contains('$599')",
"results": [
{
"html": "$599",
"text": "$599",
"attributes": [
{
"name": "class",
"value": "mt-2 pb-1 font-mono text-5xl"
}
]
}
]
},
{
"key": "Plan price",
"selector": "p.font-mono:contains('Custom')",
"results": [
{
"html": "Custom",
"text": "Custom",
"attributes": [
{
"name": "class",
"value": "mt-2 pb-1 font-mono text-4xl"
}
]
}
]
}
],
"success": true,
"advance_config": {
"console": [],
"network": [],
"cookies": []
}
}
Body
URL of the page to scrape
Items on the page to scrape. E.g. Plan price, Plan title
This parameter allows you set header properties. e.g Authentication header
Intercepting requests
- jpg
- png
Specifies conditions under which an operation should wait before proceeding.
Supported values:
timeout
selector
function
This parameter can accept one of three options:
A number indicating the time in milliseconds to wait. Maximum timeout
15000
- A valid selector to wait for. e.g
h2
A function to be ran within the page’s context, inside of the browser. e.g
() => document.querySelector('h2')
Set cookie(s)
Cookie name.
Cookie value.
The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.
Cookie domain.
Cookie path.
True if cookie is secure.
True if cookie is http-only.
Cookie SameSite type.Supported values:
Strict
Lax
None
Cookie expiration date, session cookie if not set.
Cookie Priority. Supported values:
Low
Medium
High
True if cookie is SameParty.
Cookie partition key. The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie. If not set, the cookie will be set as not partitioned.
Cookie source port. Valid values are , -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
Cookie source scheme type. Supported values:
Secure
NonSecure
Unset
The screen size preset to use. Supported values are:
QVGA
VGA
SVGA
HD
HD+
SXGA
FHD
2K
2K QHD
5K
4K UHD
Sets the viewport to mobile.
The device scale factor. The default value is 1.
The width of the viewport.
The height of the viewport
When enabled, this option forces a proxy rotation on every request. Note: Enabling this feature incurs an extra API request cost. For example, for every single request, you will be billed for two.
Allows you to specify any proxy for the scraping task.
The proxy server url. E.g https://{username}:{password}@proxy.com
Header
Your JigsawStack API key
Response
Indicates whether the call was successful.
The page position.
The page position length.
The page context
The page selector
Scrape data of the page
import { JigsawStack } from "jigsawstack";
const jigsawstack = JigsawStack({
apiKey: "your-api-key",
});
const result = await jigsawstack.web.ai_scrape({
url: "https://supabase.com/pricing",
element_prompts: ["Plan title", "Plan price"],
});
{
"page_position": 1,
"page_position_length": 3,
"context": {
"Plan header": [
"Enterprise",
"Enterprise"
],
"Plan price": [
"Custom"
]
},
"selectors": {
"Plan header": [
"h3:contains('Free')",
"h3:contains('Pro')",
"h3:contains('Team')",
"h3:contains('Enterprise')"
],
"Plan price": [
"p.font-mono:contains('$0')",
"p.font-mono:contains('$25')",
"p.font-mono:contains('$599')",
"p.font-mono:contains('Custom')"
]
},
"link": [
{
"href": "https://supabase.com/dashboard/new?plan=free",
"text": "Start for Free"
},
{
"href": "https://supabase.com/dashboard/new?plan=pro",
"text": "Get Started"
},
{
"href": "https://supabase.com/pricing#addon-compute",
"text": "Need more compute?"
},
{
"href": "https://supabase.com/dashboard/new?plan=team",
"text": "Get Started"
},
{
"href": "https://supabase.com/pricing#addon-compute",
"text": "Need more compute?"
},
{
"href": "https://forms.supabase.com/enterprise",
"text": "Contact Us"
},
{
"href": "https://supabase.com/#compare-plans",
"text": "Compare Plans"
},
],
"data": [
{
"key": "Plan header",
"selector": "h3:contains('Free')",
"results": [
{
"html": "Free",
"text": "Free",
"attributes": [
{
"name": "class",
"value": "text-foreground text-2xl font-normal uppercase flex items-center gap-4 font-mono"
}
]
},
{
"html": "Free",
"text": "Free",
"attributes": [
{
"name": "class",
"value": "text-lg xl:text-xl 2xl:text-2xl leading-5 uppercase font-mono font-normal flex items-center"
}
]
}
]
},
{
"key": "Plan header",
"selector": "h3:contains('Pro')",
"results": [
{
"html": "Pro",
"text": "Pro",
"attributes": [
{
"name": "class",
"value": "text-foreground text-2xl font-normal uppercase flex items-center gap-4 font-mono"
}
]
},
{
"html": "Pro",
"text": "Pro",
"attributes": [
{
"name": "class",
"value": "text-lg xl:text-xl 2xl:text-2xl leading-5 uppercase font-mono font-normal flex items-center"
}
]
}
]
},
{
"key": "Plan header",
"selector": "h3:contains('Team')",
"results": [
{
"html": "Team",
"text": "Team",
"attributes": [
{
"name": "class",
"value": "text-foreground text-2xl font-normal uppercase flex items-center gap-4 font-mono"
}
]
},
{
"html": "Team",
"text": "Team",
"attributes": [
{
"name": "class",
"value": "text-lg xl:text-xl 2xl:text-2xl leading-5 uppercase font-mono font-normal flex items-center"
}
]
}
]
},
{
"key": "Plan header",
"selector": "h3:contains('Enterprise')",
"results": [
{
"html": "Enterprise",
"text": "Enterprise",
"attributes": [
{
"name": "class",
"value": "text-foreground text-2xl font-normal uppercase flex items-center gap-4 font-mono"
}
]
},
{
"html": "Enterprise",
"text": "Enterprise",
"attributes": [
{
"name": "class",
"value": "text-lg xl:text-xl 2xl:text-2xl leading-5 uppercase font-mono font-normal flex items-center"
}
]
}
]
},
{
"key": "Plan price",
"selector": "p.font-mono:contains('$0')",
"results": [
{
"html": "$0",
"text": "$0",
"attributes": [
{
"name": "class",
"value": "mt-2 pb-1 font-mono text-5xl"
}
]
}
]
},
{
"key": "Plan price",
"selector": "p.font-mono:contains('$25')",
"results": [
{
"html": "$25",
"text": "$25",
"attributes": [
{
"name": "class",
"value": "mt-2 pb-1 font-mono text-5xl"
}
]
}
]
},
{
"key": "Plan price",
"selector": "p.font-mono:contains('$599')",
"results": [
{
"html": "$599",
"text": "$599",
"attributes": [
{
"name": "class",
"value": "mt-2 pb-1 font-mono text-5xl"
}
]
}
]
},
{
"key": "Plan price",
"selector": "p.font-mono:contains('Custom')",
"results": [
{
"html": "Custom",
"text": "Custom",
"attributes": [
{
"name": "class",
"value": "mt-2 pb-1 font-mono text-4xl"
}
]
}
]
}
],
"success": true,
"advance_config": {
"console": [],
"network": [],
"cookies": []
}
}
Was this page helpful?
import { JigsawStack } from "jigsawstack";
const jigsawstack = JigsawStack({
apiKey: "your-api-key",
});
const result = await jigsawstack.web.ai_scrape({
url: "https://supabase.com/pricing",
element_prompts: ["Plan title", "Plan price"],
});
{
"page_position": 1,
"page_position_length": 3,
"context": {
"Plan header": [
"Enterprise",
"Enterprise"
],
"Plan price": [
"Custom"
]
},
"selectors": {
"Plan header": [
"h3:contains('Free')",
"h3:contains('Pro')",
"h3:contains('Team')",
"h3:contains('Enterprise')"
],
"Plan price": [
"p.font-mono:contains('$0')",
"p.font-mono:contains('$25')",
"p.font-mono:contains('$599')",
"p.font-mono:contains('Custom')"
]
},
"link": [
{
"href": "https://supabase.com/dashboard/new?plan=free",
"text": "Start for Free"
},
{
"href": "https://supabase.com/dashboard/new?plan=pro",
"text": "Get Started"
},
{
"href": "https://supabase.com/pricing#addon-compute",
"text": "Need more compute?"
},
{
"href": "https://supabase.com/dashboard/new?plan=team",
"text": "Get Started"
},
{
"href": "https://supabase.com/pricing#addon-compute",
"text": "Need more compute?"
},
{
"href": "https://forms.supabase.com/enterprise",
"text": "Contact Us"
},
{
"href": "https://supabase.com/#compare-plans",
"text": "Compare Plans"
},
],
"data": [
{
"key": "Plan header",
"selector": "h3:contains('Free')",
"results": [
{
"html": "Free",
"text": "Free",
"attributes": [
{
"name": "class",
"value": "text-foreground text-2xl font-normal uppercase flex items-center gap-4 font-mono"
}
]
},
{
"html": "Free",
"text": "Free",
"attributes": [
{
"name": "class",
"value": "text-lg xl:text-xl 2xl:text-2xl leading-5 uppercase font-mono font-normal flex items-center"
}
]
}
]
},
{
"key": "Plan header",
"selector": "h3:contains('Pro')",
"results": [
{
"html": "Pro",
"text": "Pro",
"attributes": [
{
"name": "class",
"value": "text-foreground text-2xl font-normal uppercase flex items-center gap-4 font-mono"
}
]
},
{
"html": "Pro",
"text": "Pro",
"attributes": [
{
"name": "class",
"value": "text-lg xl:text-xl 2xl:text-2xl leading-5 uppercase font-mono font-normal flex items-center"
}
]
}
]
},
{
"key": "Plan header",
"selector": "h3:contains('Team')",
"results": [
{
"html": "Team",
"text": "Team",
"attributes": [
{
"name": "class",
"value": "text-foreground text-2xl font-normal uppercase flex items-center gap-4 font-mono"
}
]
},
{
"html": "Team",
"text": "Team",
"attributes": [
{
"name": "class",
"value": "text-lg xl:text-xl 2xl:text-2xl leading-5 uppercase font-mono font-normal flex items-center"
}
]
}
]
},
{
"key": "Plan header",
"selector": "h3:contains('Enterprise')",
"results": [
{
"html": "Enterprise",
"text": "Enterprise",
"attributes": [
{
"name": "class",
"value": "text-foreground text-2xl font-normal uppercase flex items-center gap-4 font-mono"
}
]
},
{
"html": "Enterprise",
"text": "Enterprise",
"attributes": [
{
"name": "class",
"value": "text-lg xl:text-xl 2xl:text-2xl leading-5 uppercase font-mono font-normal flex items-center"
}
]
}
]
},
{
"key": "Plan price",
"selector": "p.font-mono:contains('$0')",
"results": [
{
"html": "$0",
"text": "$0",
"attributes": [
{
"name": "class",
"value": "mt-2 pb-1 font-mono text-5xl"
}
]
}
]
},
{
"key": "Plan price",
"selector": "p.font-mono:contains('$25')",
"results": [
{
"html": "$25",
"text": "$25",
"attributes": [
{
"name": "class",
"value": "mt-2 pb-1 font-mono text-5xl"
}
]
}
]
},
{
"key": "Plan price",
"selector": "p.font-mono:contains('$599')",
"results": [
{
"html": "$599",
"text": "$599",
"attributes": [
{
"name": "class",
"value": "mt-2 pb-1 font-mono text-5xl"
}
]
}
]
},
{
"key": "Plan price",
"selector": "p.font-mono:contains('Custom')",
"results": [
{
"html": "Custom",
"text": "Custom",
"attributes": [
{
"name": "class",
"value": "mt-2 pb-1 font-mono text-4xl"
}
]
}
]
}
],
"success": true,
"advance_config": {
"console": [],
"network": [],
"cookies": []
}
}