MegalaniaDocs
Docs menu
docs.megalania.io

One request in, the page out.

Send a URL. Get the page back as HTML, Markdown or JSON. We start on the cheapest route and climb only when a site blocks us. Blocks we detect are free.

llms.txt
: "${MEG_API_KEY:?Set MEG_API_KEY first}"
# export MEG_API_KEY=YOUR_KEY

curl -X POST https://get.megalania.io/v1 \
  -H "Authorization: Bearer $MEG_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen 2>/dev/null || cat /proc/sys/kernel/random/uuid)" \
  -d '{"url":"https://docs.megalania.io/start/quickstart","response_types":"markdown"}' \
  --fail-with-body -D - -o page.md
# export MEG_API_KEY=YOUR_KEY

import os
import uuid

import requests

resp = requests.post(
    "https://get.megalania.io/v1",
    headers={"Authorization": f"Bearer {os.environ['MEG_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={
        "url": "https://docs.megalania.io/start/quickstart",
        "response_types": "markdown",
    },
    timeout=90,
)
print(resp.status_code, resp.headers.get("X-Credits-Charged"), resp.headers.get("X-Route"))
print(resp.text[:500])
// export MEG_API_KEY=YOUR_KEY

const res = await fetch("https://get.megalania.io/v1", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEG_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    "url": "https://docs.megalania.io/start/quickstart",
    "response_types": "markdown"
  }),
});
console.log(res.status, res.headers.get("x-credits-charged"), res.headers.get("x-route"));
console.log((await res.text()).slice(0, 500));
// export MEG_API_KEY=YOUR_KEY

package main

import (
	"crypto/rand"
	"fmt"
	"io"
	"log"
	"net/http"
	"os"
	"strings"
)

func main() {
	body := strings.NewReader(`{"url":"https://docs.megalania.io/start/quickstart","response_types":"markdown"}`)
	req, err := http.NewRequest("POST", "https://get.megalania.io/v1", body)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("MEG_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Idempotency-Key", rand.Text())

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()
	page, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.StatusCode, resp.Header.Get("X-Credits-Charged"), len(page))
}

Set MEG_API_KEY to your meg_sk_ key first. This page usually costs 1 credit (the most is 32).

Start here

Pricing and credits

The route that fetched the page sets its price. Leave engine and proxy_tier out, and we try the cheapest route first.

Route Credits a page Included data Each started 128 KiB above Most a page costs Largest page
HTTP, datacenter 1 64 KiB +1 129 16 MiB
HTTP, residential 8 64 KiB +8 520 8 MiB
Browser, datacenter 15 1 MiB +1 87 10 MiB
Browser, residential 32 64 KiB +8 544 8 MiB

Lowest credits per page, before page size. Each site has its own price: a site we have not priced yet costs at least 8 on residential and Browser. Run check_site (free) to see the price for your site.

Blocks we detect are free. Errors are free too. X-Credits-Charged on every answer says what the request cost. Credits and pricing has the details.

For AI agents

The docs are written to be read by a model, too.

llms.txtEvery page, one line each. docs.megalania.io/llms.txt
llms-full.txtAll pages in one file, for one context load. docs.megalania.io/llms-full.txt
A Markdown twin of every pageAdd .md to any docs URL.
MCP servermcp.megalania.io, 15 tools: scrape, extract, inspect, map_site, create_batch, get_batch, check_site (free), create_monitor, list_monitors, get_monitor_changes, update_monitor, delete_monitor, cancel_batch, list_batches, get_usage.
Claude Code
claude mcp add --transport http megalania https://mcp.megalania.io