Docs menu
- Docs
- Integrations
- n8n
n8n
Install the community node n8n-nodes-megalania, add a Megalania API credential with your key, and use the Megalania node in a workflow or as a tool of the AI Agent node.
Install
- In n8n, open Settings → Community Nodes and select Install.
- Enter
n8n-nodes-megalaniaand confirm. - Create a credential of type Megalania API. Paste your key (it starts
with
meg_sk_). Leave the two hosts as they are. n8n tests the key with a free call.
The test is the same call as this one:
curl -fsS -H "Authorization: Bearer $MEG_API_KEY" "https://api.megalania.io/v1/batches?limit=1"
Operations
| Resource | Operation | API call | What you get |
|---|---|---|---|
| Page | Scrape | POST /v1 |
content, credits_charged, request_id, truncated |
| Site | Map | POST /v1/map |
the site’s URLs |
| Batch | Create | POST /v1/batches |
the batch, with its id |
| Batch | Get | GET /v1/batches/{id} |
the batch’s status and counts |
| Batch | List Items | GET /v1/batches/{id}/items |
each page, with a result_url |
Scrape takes the options of the JSON envelope: response type, engine, proxy tier, country code, main content only and max credits. Leave engine and proxy tier unset, so routing picks the cheapest route that works.
Each page costs at most 128 credits by default (Max Credits). A bigger
page comes back cut, and truncated says max_credits. Raise it in the node
to get the whole page. Blocked pages and errors are free.
For a crawl, put one URL in URLs and a JSON object in Crawl, for
example {"max_pages": 50}. Then poll Get until status is done, and
read the pages from List Items.
The code is MIT licensed at https://github.com/megalania/megalania-typescript.