Scrape overview
POST /v1/crawl/web/scrape is the default FairCrawl read path for one URL.
Use it when:
- one page can answer the question
- you need text, markdown, HTML, metadata, or screenshot output
- the target may require JS rendering or premium routing
- the source is a PDF or DOCX instead of HTML
Request shape
The scrape route accepts a JSON body with a required url and optional extraction controls such as format, render_js, only_main_content, screenshot, query, premium, proxy_country, pdf_mode, and max_pages.
Basic scrape request
```bash
curl https://api.faircompany.ai/v1/crawl/web/scrape \
-X POST \
-H "Authorization: Bearer fc_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"url": "https://stripe.com/pricing",
"format": "markdown",
"only_main_content": true
}'
```
```ts
import FairCrawl from "faircrawl";
const fc = new FairCrawl({ apiKey: process.env.FAIRCRAWL_API_KEY || "fc_live_xxx" });
const result = await fc.scrape({
url: "https://stripe.com/pricing",
format: "markdown",
only_main_content: true,
});
console.log(result.text);
console.log(result._meta.cost);
```
```python
from faircrawl import FairCrawl
fc = FairCrawl()
result = fc.scrape(
"https://stripe.com/pricing",
format="markdown",
only_main_content=True,
)
print(result.text)
print(result.meta.cost)
```
```json
{
"tool": "faircrawl_scrape",
"arguments": {
"url": "https://stripe.com/pricing",
"format": "markdown",
"only_main_content": true
}
}
```
Routing behavior
- static HTML starts on the cheapest fetch path
- JS-heavy pages can escalate to browser rendering
- hard targets can escalate to premium or proxy-backed fetchers
- PDFs and DOCX files use the document extraction path instead of the HTML parser
Related pages
/docs/endpoints/scrape/parameters//docs/endpoints/scrape/response-shape//docs/endpoints/scrape/examples/