> ## 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.

# Quickstart

> Make your first Olostep request: get an API key, scrape one page, and read the result.

Scrape one web page and get its content as Markdown. One scrape uses [credits](https://docs.olostep.com/features/scrapes.md#pricing) from your account.

**1. Get your API key**

Sign in to the [Olostep dashboard](https://www.olostep.com/dashboard/api-keys) and copy an API key. If you do not have an account, [create one](https://www.olostep.com/auth/).

Set the key as an environment variable. Then the key stays out of your 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. Check your key**

Get your credit balance. This request checks the key, and it is free.

```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
```

If the key works, the response shows your balance in `credits`. A new account includes 500 credits to start. The cURL response looks like this (shortened):

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

If you get `401` or `402`, see [If it does not work](#if-it-does-not-work).

**3. Install a client**

Install the client that you want to use. For cURL or PowerShell, skip this step.

```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
```

The Python SDK needs Python 3.11 to 3.13. The Node.js SDK needs Node.js 18 or later. The CLI needs macOS or Linux and Node.js 20.19 or later. See [Install the CLI](https://docs.olostep.com/cli/install.md) for details.

The CLI signs in with your Olostep account, not with the API key. If the installer changed your `PATH`, open a new terminal first. Then sign in:

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

**4. Scrape a page**

Send `https://example.com` to the Scrape endpoint and ask for Markdown. Use the same terminal in which you set the key.

```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()  # Reads the OLOSTEP_API_KEY environment variable
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
```

To run the Python sample, save it as `quickstart.py` and run `python quickstart.py`. To run the Node.js sample, save it as `quickstart.mjs` and run `node quickstart.mjs`.

**5. Read the result**

cURL prints the raw JSON response. PowerShell, Python, and Node.js print the Markdown content. The CLI prints the result for your terminal.

In the API response, the page content is in `result.markdown_content`:

```json API response (shortened) 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..."
  }
}
```

Keep the `id` if you want to get this scrape again later with [`GET /v1/scrapes/{scrape_id}`](https://docs.olostep.com/api-reference/scrapes/get).

## If it does not work

With cURL, add `-i` to the command to also see the HTTP status.

| What you see | What it means | What to do |
| - | - | - |
| `401` or `402`. In Python: `OlostepServerError_AuthFailed` or `OlostepServerError_CreditsExhausted`. | The API key is missing or not valid, or your account has no credits left. | Make sure that `OLOSTEP_API_KEY` is set in the same terminal, and that the key is correct. Then check your credits in the [dashboard](https://www.olostep.com/dashboard/). To check the key and the balance, run the check in step 2. |
| `400` | The request is not valid, or Olostep cannot reach the URL. The response body says why. | Read the response body. Check the URL and the request fields. |
| `504`. In Python: `OlostepServerError_NoResultInResponse`. | The scrape did not finish in time. By default, both SDKs send the request again, so an SDK call can take several minutes before it fails. | Send the request again, or try another URL. A failed scrape costs no credits. |
| `429` | You sent too many requests. | Wait, then send the request again. If the response has a `Retry-After` header, wait that number of seconds. |
| Python: `ValueError: API key is required when using the real HTTP transport` | The SDK found no API key. | Set `OLOSTEP_API_KEY` before you start Python, or pass `api_key` to `Olostep()`. |
| Python 1.2.3: `UserWarning` about `extra field(s)` | The response contains fields that this SDK version does not define. | If the sample prints Markdown, continue. You can ignore this warning. |

## Next steps

> [card] [Scrape options](https://docs.olostep.com/features/scrapes.md)
>
> Formats, parsers, structured JSON, and more.

> [card] [Many URLs at once](https://docs.olostep.com/features/batches.md)
>
> Scrape a list of URLs in one batch job.

> [card] [Crawl a website](https://docs.olostep.com/features/crawls.md)
>
> Get the pages of a whole site.

> [card] [Search the web](https://docs.olostep.com/features/search.md)
>
> Find relevant links for a query.

> [card] [Answers](https://docs.olostep.com/features/answers.md)
>
> Ask a question and get an answer with sources.

> [card] [SDKs](https://docs.olostep.com/sdks/overview.md)
>
> Python and Node.js libraries.

> [card] [AI agents](https://docs.olostep.com/integrations/mcp-server.md)
>
> Give your AI agent web access with the Olostep MCP server.


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