Skip to main content

Basic Example

Extract product data from any page:
const response = await fetch("https://mino.ai/v1/automation/run-sse", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.MINO_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://scrapeme.live/shop/Bulbasaur/",
    goal: "Extract the product name, price, and stock status",
  }),
});

const reader = response.body.getReader();
const decoder = new TextDecoder();
let buffer = "";

while (true) {
  const { done, value } = await reader.read();
  if (done) break;

  buffer += decoder.decode(value, { stream: true });
  const lines = buffer.split("\n");
  buffer = lines.pop() ?? "";

  for (const line of lines) {
    if (line.startsWith("data: ")) {
      const event = JSON.parse(line.slice(6));

      if (event.type === "COMPLETE" && event.status === "COMPLETED") {
        console.log("Result:", event.resultJson);
      }
    }
  }
}
Output:
{
  "name": "Bulbasaur",
  "price": 63,
  "inStock": true
}

Extract Multiple Items

Get all products from a category page:
const response = await fetch("https://mino.ai/v1/automation/run-sse", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.MINO_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://scrapeme.live/shop/",
    goal: "Extract all products on this page. For each product return: name, price, and link",
  }),
});
Output:
{
  "products": [
    { "name": "Bulbasaur", "price": 63, "link": "https://..." },
    { "name": "Ivysaur", "price": 87, "link": "https://..." },
    { "name": "Venusaur", "price": 105, "link": "https://..." }
  ]
}

Use Stealth Mode

For sites with bot protection:
const response = await fetch("https://mino.ai/v1/automation/run-sse", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.MINO_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://protected-site.com",
    goal: "Extract product data",
    browser_profile: "stealth",
  }),
});

Use Proxy

Route through a specific country:
const response = await fetch("https://mino.ai/v1/automation/run-sse", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.MINO_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://geo-restricted-site.com",
    goal: "Extract data",
    browser_profile: "stealth",
    proxy_config: {
      enabled: true,
      country_code: "US",
    },
  }),
});

Try It

1

Save the code

Save any example above as scraper.mjs
2

Set your API key

export MINO_API_KEY="your_api_key"
3

Run it

node scraper.mjs