ScavioScavio
Pricing
Tools
Sign InsGet Startedg
  1. Home
  2. Tutorials
  3. How to Build a Scraping Tool with a Local Uncensored LLM and Scavio
Tutorial

How to Build a Scraping Tool with a Local Uncensored LLM and Scavio

Pair a locally hosted uncensored LLM with Scavio for a fully local scraping tool that handles extraction prompts without content filters. 5 steps, with working code.

Get Free API KeyAPI Docs

r/LocalLLaMA 2026 has regular threads on pairing local uncensored models (Dolphin, Wizard, Nous) with a cloud-hosted scraping backend. The split is deliberate: the LLM runs locally for privacy and flexibility, Scavio supplies the web data. This tutorial builds that architecture. Scavio's Extract endpoint (POST /api/v1/extract) reads a URL and returns it as Markdown, HTML or plain text, so the local model works on clean page content instead of raw markup. Use mode advanced for pages built with JavaScript, and the Crawl endpoint when you need a whole site rather than one page.

API Docs: Extract API, Crawl API

Prerequisites

  • Ollama or llama.cpp
  • A local uncensored model (dolphin-mixtral, nous-hermes)
  • A Scavio API key
  • Python 3.10+

Walkthrough

Step 1: Run the local LLM

Ollama makes this one command.

Bash
ollama run dolphin-mixtral

Step 2: Call Scavio for the scraping layer

Scavio returns the data, so there is no fetching layer for you to maintain.

Python
import requests, os

# Scavio Extract reads one URL and returns the page as markdown, html or text.
# mode: "normal" (1 credit), "advanced" renders JavaScript (1 credit),
# "ultra" for the hardest pages (2 credits). Only a successful call is billed.
# Docs: https://scavio.dev/docs/extract
def scavio_extract(url, headers, mode="normal", fmt="markdown"):
    r = requests.post("https://api.scavio.dev/api/v1/extract", headers=headers,
                      json={"url": url, "format": fmt, "mode": mode}, timeout=90)
    r.raise_for_status()
    return r.json()["data"]["content"]

API_KEY = os.environ['SCAVIO_API_KEY']

def fetch(url, mode='normal'):
    return scavio_extract(url, {'Authorization': f'Bearer {API_KEY}'}, mode=mode)

Step 3: Let the local LLM do extraction

No content filters on the extraction prompt.

Python
import requests
def extract_with_local(html, instruction):
    r = requests.post('http://localhost:11434/api/generate',
        json={'model': 'dolphin-mixtral', 'prompt': f'{instruction}\n\nPAGE:\n{html[:4000]}'})
    return r.json()['response']

Step 4: Wire the full pipeline

Fetch via Scavio, extract via local LLM.

Python
def scrape(url, instruction):
    html = fetch(url)
    return extract_with_local(html, instruction)

print(scrape('https://target.com', 'Extract all product names and prices as JSON.'))

Step 5: Validate output

Light schema check before saving.

Python
import json
def validate(out):
    try: json.loads(out); return True
    except: return False

Python Example

Python
import os, requests

# Scavio Extract reads one URL and returns the page as markdown, html or text.
# mode: "normal" (1 credit), "advanced" renders JavaScript (1 credit),
# "ultra" for the hardest pages (2 credits). Only a successful call is billed.
# Docs: https://scavio.dev/docs/extract
def scavio_extract(url, headers, mode="normal", fmt="markdown"):
    r = requests.post("https://api.scavio.dev/api/v1/extract", headers=headers,
                      json={"url": url, "format": fmt, "mode": mode}, timeout=90)
    r.raise_for_status()
    return r.json()["data"]["content"]


API_KEY = os.environ['SCAVIO_API_KEY']

def scrape(url, instruction):
    html = scavio_extract(url, {'Authorization': f'Bearer {API_KEY}'})
    r = requests.post('http://localhost:11434/api/generate',
        json={'model': 'dolphin-mixtral', 'prompt': f'{instruction}\n\n{html[:4000]}'})
    return r.json().get('response', '')

print(scrape('https://example.com', 'List headings as JSON'))

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
export async function scrape(url, instruction) {
  const s = await fetch('https://api.scavio.dev/api/v1/extract', {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' },
    body: JSON.stringify({ url, format: 'markdown', mode: 'normal' })
  });
  const page = (await s.json()).data?.content || '';
  const o = await fetch('http://localhost:11434/api/generate', {
    method: 'POST',
    body: JSON.stringify({ model: 'dolphin-mixtral', prompt: `${instruction}\n\n${page.slice(0, 4000)}`, stream: false })
  });
  return (await o.json()).response;
}

Expected Output

JSON
Fully local extraction logic, with Scavio supplying the web data. Per-page cost: 1 Scavio credit + local GPU time. Data never leaves local box except the URL.

Related Tutorials

    Frequently Asked Questions

    Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

    Ollama or llama.cpp. A local uncensored model (dolphin-mixtral, nous-hermes). A Scavio API key. Python 3.10+. A Scavio API key gives you 50 free credits on signup.

    Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

    Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

    Related Resources

    Best Of

    Best Personal Knowledge Base Tools for Local LLMs in May 2026

    Read more
    Workflow

    Daily Search Grounding for Ollama Assistant

    Read more
    Best Of

    Best Search Grounding for Local LLMs in 2026

    Read more
    Solution

    Build a Personal Assistant with Ollama and Search

    Read more
    Glossary

    Local LLM MCP Integration

    Read more
    Comparison

    Scrapingdog vs Scavio

    Read more

    Start Building

    Pair a locally hosted uncensored LLM with Scavio for a fully local scraping tool that handles extraction prompts without content filters. 5 steps, with working code.

    Get Free API KeyRead the Docs
    ScavioScavio

    One scraper API for every social, search, e-commerce and real estate platform. Built for AI agents.

    Product

    • Features
    • Pricing
    • Dashboard
    • Affiliates

    Developers

    • Documentation
    • API Reference
    • Quickstart
    • MCP Integration
    • Python SDK

    Alternatives

    • Tavily Alternative
    • SerpAPI Alternative
    • Firecrawl Alternative
    • Exa Alternative
    • Serper Alternative
    • Tavily vs Scavio
    • SerpAPI vs Scavio
    • All alternatives
    • Compare Scavio vs alternatives

    Search APIs

    • Google Search API
    • Amazon Product API
    • YouTube API
    • Reddit API
    • Walmart Product API
    • TikTok API
    • Instagram API

    Tools

    • All Tools

    © 2026 Scavio. All rights reserved.

    Featured on TAAFT
    Terms of ServicePrivacy Policy