> ## Documentation Index
> Fetch the complete documentation index at: https://docs.olostep.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Snelstartgids

> Doe je eerste Olostep-aanvraag: verkrijg een API-sleutel, scrape één pagina en lees het resultaat.

Scrape één webpagina en verkrijg de inhoud als Markdown. Eén scrape gebruikt [credits](https://docs.olostep.com/features/scrapes.md#pricing) van je account.

**1. Verkrijg je API-sleutel**

Meld je aan bij het [Olostep-dashboard](https://www.olostep.com/dashboard/api-keys) en kopieer een API-sleutel. Als je nog geen account hebt, [maak er een aan](https://www.olostep.com/auth/).

Stel de sleutel in als een omgevingsvariabele. Zo blijft de sleutel buiten je code.

```bash macOS / Linux theme={null}
export OLOSTEP_API_KEY="<YOUR_API_KEY>"
```

```powershell Windows (PowerShell) theme={null}
$env:OLOSTEP_API_KEY = "<YOUR_API_KEY>"
```

**2. Controleer je sleutel**

Verkrijg je kredietsaldo. Deze aanvraag controleert de sleutel en is gratis.

```bash macOS / Linux theme={null}
curl --max-time 30 "https://api.olostep.com/user/credits/info" \
  -H "Authorization: Bearer $OLOSTEP_API_KEY"
```

```powershell Windows (PowerShell) theme={null}
Invoke-RestMethod -Uri "https://api.olostep.com/user/credits/info" `
  -Headers @{ Authorization = "Bearer $env:OLOSTEP_API_KEY" } -TimeoutSec 30
```

Als de sleutel werkt, toont de respons je saldo in `credits`. Een nieuw account bevat 500 credits om te starten. De cURL-respons ziet er als volgt uit (verkort):

```json Response (verkort) theme={null}
{
  "credits": 500,
  "allow_usage": true
}
```

Als je `401` of `402` ontvangt, zie [Als het niet werkt](#if-it-does-not-work).

**3. Installeer een client**

Installeer de client die je wilt gebruiken. Voor cURL of PowerShell, sla deze stap over.

```bash Python theme={null}
pip install olostep
```

```bash Node theme={null}
npm install olostep
```

```bash CLI theme={null}
curl -fsSL https://cli.olostep.com | sh
```

De Python SDK vereist Python 3.11 tot 3.13. De Node.js SDK vereist Node.js 18 of later. De CLI vereist macOS of Linux en Node.js 20.19 of later. Zie [Installeer de CLI](https://docs.olostep.com/cli/install.md) voor details.

De CLI logt in met je Olostep-account, niet met de API-sleutel. Als de installer je `PATH` heeft gewijzigd, open dan eerst een nieuwe terminal. Log dan in:

```bash theme={null}
olostep login
```

**4. Scrape een pagina**

Stuur `https://example.com` naar het Scrape-eindpunt en vraag om Markdown. Gebruik dezelfde terminal waarin je de sleutel hebt ingesteld.

```bash cURL theme={null}
curl --max-time 180 -X POST "https://api.olostep.com/v1/scrapes" \
  -H "Authorization: Bearer $OLOSTEP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url_to_scrape": "https://example.com", "formats": ["markdown"]}'
```

```powershell PowerShell theme={null}
$body = @{ url_to_scrape = "https://example.com"; formats = @("markdown") } | ConvertTo-Json
$response = Invoke-RestMethod -Method Post -Uri "https://api.olostep.com/v1/scrapes" `
  -Headers @{ Authorization = "Bearer $env:OLOSTEP_API_KEY" } `
  -ContentType "application/json" -Body $body -TimeoutSec 180
$response.result.markdown_content
```

```python Python theme={null}
from olostep import Olostep

client = Olostep()  # Leest de OLOSTEP_API_KEY omgevingsvariabele
result = client.scrapes.create(
    url_to_scrape="https://example.com", formats=["markdown"]
)
print(result.markdown_content)
```

```js Node theme={null}
import Olostep from 'olostep'

const client = new Olostep({ apiKey: process.env.OLOSTEP_API_KEY })
const result = await client.scrapes.create({ url: 'https://example.com', formats: ['markdown'] })
console.log(result.markdown_content)
```

```bash CLI theme={null}
olostep scrape https://example.com -f markdown
```

Om het Python-voorbeeld uit te voeren, sla het op als `quickstart.py` en voer `python quickstart.py` uit. Om het Node.js-voorbeeld uit te voeren, sla het op als `quickstart.mjs` en voer `node quickstart.mjs` uit.

**5. Lees het resultaat**

cURL print de ruwe JSON-respons. PowerShell, Python en Node.js printen de Markdown-inhoud. De CLI print het resultaat voor je terminal.

In de API-respons staat de pagina-inhoud in `result.markdown_content`:

```json API-respons (verkort) theme={null}
{
  "id": "scrape_abc123",
  "object": "scrape",
  "created": 1763049600,
  "url": "https://example.com",
  "retrieve_id": "abc123",
  "result": {
    "markdown_content": "# Example Domain\n\nThis domain is for use in illustrative examples in documents..."
  }
}
```

Bewaar de `id` als je deze scrape later opnieuw wilt ophalen met [`GET /v1/scrapes/{scrape_id}`](https://docs.olostep.com/api-reference/scrapes/get).

## Als het niet werkt

Met cURL, voeg `-i` toe aan het commando om ook de HTTP-status te zien.

| Wat je ziet | Wat het betekent | Wat te doen |
| - | - | - |
| `401` of `402`. In Python: `OlostepServerError_AuthFailed` of `OlostepServerError_CreditsExhausted`. | De API-sleutel ontbreekt of is niet geldig, of je account heeft geen credits meer. | Zorg ervoor dat `OLOSTEP_API_KEY` is ingesteld in dezelfde terminal, en dat de sleutel correct is. Controleer dan je credits in het [dashboard](https://www.olostep.com/dashboard/). Om de sleutel en het saldo te controleren, voer de controle uit in stap 2. |
| `400` | De aanvraag is niet geldig, of Olostep kan de URL niet bereiken. Het responslichaam zegt waarom. | Lees het responslichaam. Controleer de URL en de aanvraagvelden. |
| `504`. In Python: `OlostepServerError_NoResultInResponse`. | De scrape is niet op tijd voltooid. Standaard sturen beide SDK's de aanvraag opnieuw, dus een SDK-aanroep kan enkele minuten duren voordat deze mislukt. | Stuur de aanvraag opnieuw, of probeer een andere URL. Een mislukte scrape kost geen credits. |
| `429` | Je hebt te veel aanvragen verstuurd. | Wacht, stuur dan de aanvraag opnieuw. Als de respons een `Retry-After` header heeft, wacht dat aantal seconden. |
| Python: `ValueError: API key is required when using the real HTTP transport` | De SDK vond geen API-sleutel. | Stel `OLOSTEP_API_KEY` in voordat je Python start, of geef `api_key` door aan `Olostep()`. |
| Python 1.2.3: `UserWarning` over `extra field(s)` | De respons bevat velden die deze SDK-versie niet definieert. | Als het voorbeeld Markdown print, ga verder. Je kunt deze waarschuwing negeren. |

## Volgende stappen

> [card] [Scrape-opties](https://docs.olostep.com/features/scrapes.md)
>
> Formaten, parsers, gestructureerde JSON en meer.

> [card] [Veel URL's tegelijk](https://docs.olostep.com/features/batches.md)
>
> Scrape een lijst van URL's in één batchopdracht.

> [card] [Crawl een website](https://docs.olostep.com/features/crawls.md)
>
> Verkrijg de pagina's van een hele site.

> [card] [Zoek het web](https://docs.olostep.com/features/search.md)
>
> Vind relevante links voor een query.

> [card] [Antwoorden](https://docs.olostep.com/features/answers.md)
>
> Stel een vraag en krijg een antwoord met bronnen.

> [card] [SDK's](https://docs.olostep.com/sdks/overview.md)
>
> Python en Node.js bibliotheken.

> [card] [AI-agenten](https://docs.olostep.com/integrations/mcp-server.md)
>
> Geef je AI-agent webtoegang met de Olostep MCP-server.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.