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

# Migration von Exa zu Olostep

> Endpoint-, SDK-, Parameter- und Antwortzuordnung für die Umstellung von Exa-Suche, -Inhalten und -Antworten zu Olostep, geschrieben, damit ein Coding-Agent den Wechsel durchführen kann.

Exas `/search`, `/contents` und `/answer` entsprechen Olosteps [Search](https://docs.olostep.com/features/search.md), [Scrape](https://docs.olostep.com/features/scrapes.md) und [Answers](https://docs.olostep.com/features/answers.md). Der Wechsel erfordert das SDK oder die Basis-URL, den API-Schlüssel und einige Parameternamen.

> [!TIP]
>
> **Verwendest du einen Coding-Agenten?** Gib ihm diesen Prompt:
>
> ```text theme={null}
> Migriere diesen Code von Exa zu Olostep. Folge
> https://docs.olostep.com/migrate/exa.md genau: tausche das SDK und den API-Schlüssel aus, ordne jeden
> Exa-Aufruf seinem Olostep-Äquivalent zu und aktualisiere den Code, der die Antworten liest.
> Lies OLOSTEP_API_KEY aus der Umgebung. Liste alles auf, wofür es kein Olostep-Äquivalent gibt,
> anstatt zu raten.
> ```

## Schneller Wechsel

| | Exa | Olostep |
| - | - | - |
| Python-Paket | `pip install exa-py` | `pip install olostep` |
| Node-Paket | `npm install exa-js` | `npm install olostep` |
| API-Schlüssel-Variable | `EXA_API_KEY` | `OLOSTEP_API_KEY` |
| Basis-URL | `https://api.exa.ai` | `https://api.olostep.com/v1` |
| Auth-Header | `x-api-key: ...` (oder `Authorization: Bearer ...`) | `Authorization: Bearer $OLOSTEP_API_KEY` |
| Feldstil | camelCase | snake\_case in HTTP und Python, camelCase-Optionen in Node |

Erhalte einen Schlüssel unter [olostep.com/auth](https://www.olostep.com/auth). Neue Konten erhalten 500 kostenlose Credits.

```python Python theme={null}
# Vorher
from exa_py import Exa
exa = Exa()  # liest EXA_API_KEY

# Nachher
from olostep import Olostep
client = Olostep()  # liest OLOSTEP_API_KEY
```

```javascript Node theme={null}
// Vorher
import Exa from "exa-js";
const exa = new Exa(process.env.EXA_API_KEY);

// Nachher
import Olostep from "olostep";
const client = new Olostep({ apiKey: process.env.OLOSTEP_API_KEY });
```

## Endpoint-Zuordnung

| Exa | Olostep | Anmerkungen |
| - | - | - |
| `POST /search` | `POST /searches` | Bis zu 25 Ergebnisse pro Aufruf (Exa: 100) |
| `POST /search` mit `contents.text` | `POST /searches` mit `scrape_options` | Seiten-Markdown bei jedem Ergebnis. Siehe [Suche mit Seitentext](#search-with-page-text) |
| `POST /contents` | `POST /scrapes` (eine URL) oder `POST /batches` (viele) | Ein Scrape pro URL; Olostep hat keinen Multi-URL-Scrape-Aufruf |
| `POST /answer` | `POST /answers` | Synchron; Quellen sind URLs |
| `POST /findSimilar` (veraltet) | `POST /searches` | Beschreibe die Seite in `query` (Exas eigener Rat) |
| Agenten-API, `/research` (entfernt) | `POST /answers` für eine Frage; [Agents](https://docs.olostep.com/features/agents.md) für längere Recherchen | |
| Websets, Monitore | [Monitors](https://docs.olostep.com/features/monitors.md) zum Beobachten eines Themas oder einer Seite | Kein Äquivalent für Websets |

## SDK-Methoden-Zuordnung

| Exa Python | Exa Node | Olostep Python | Olostep Node |
| - | - | - | - |
| `exa.search(query, num_results=5)` | `exa.search(query, { numResults: 5 })` | `client.searches.create(query=query, limit=5)` | `client.searches.create({ query, limit: 5 })` |
| `exa.search(query, contents={"text": True})`, `search_and_contents(query, text=True)` | `exa.search(query, { contents: { text: true } })`, `searchAndContents` | `client.searches.create(query=query, scrape_options={"formats": ["markdown"], "timeout": 45})` | `client.searches.create({ query, scrapeOptions: { formats: ["markdown"], timeout: 45 } })` |
| `exa.get_contents([url], text=True)` | `exa.getContents([url], { text: true })` | `client.scrapes.create(url_to_scrape=url, formats=["markdown"])` pro URL | `client.scrapes.create({ url, formats: ["markdown"] })` pro URL |
| `exa.answer(query, output_schema=...)` | `exa.answer(query, { outputSchema })` | `client.answers.create(task=query, json_format={...})` | `client.answers.create({ task: query, jsonFormat: {...} })` |

> [!WARNING]
>
> Exas SDKs geben standardmäßig Seitentext von `search()` zurück (bis zu 10.000 Zeichen pro Ergebnis). Olosteps Suche gibt nur Titel, URLs und Beschreibungen zurück. Wenn dein Code `result.text` nach einer einfachen `search()` liest, füge `scrape_options` hinzu (siehe unten) oder scrape die benötigten Ergebnisse.

**Ergebnisse lesen**

| Exa | Olostep Python | Olostep Node |
| - | - | - |
| `response.results` | `results.links` | `results.links` |
| `result.url` / `result.title` | `link["url"]` / `link["title"]` | `link.url` / `link.title` |
| `result.text` | `link["markdown_content"]` (mit `scrape_options`) | `link.markdown_content` |
| `result.highlights`, `result.summary` | kein Äquivalent: verwende `link["description"]` oder Answers | `link.description` |
| `contents.results[0].text` | `page.markdown_content` von `scrapes.create` | `page.markdown_content` |
| `answer.answer` | `json.loads(answer.json_content)` | `JSON.parse(answer.json_content)` |
| `answer.citations[i].url` | `answer.sources[i]` (URL-Strings) | `answer.sources[i]` |

### Beispiel

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

client = Olostep()  # liest OLOSTEP_API_KEY

results = client.searches.create(query="latest Node.js release", limit=5)
for link in results.links:
    print(link["url"], link["title"])

page = client.scrapes.create(url_to_scrape="https://nodejs.org/en/blog", formats=["markdown"])
print(page.markdown_content[:500])

answer = client.answers.create(
    task="What is the latest Node.js LTS version?", json_format={"version": ""}
)
print(json.loads(answer.json_content), answer.sources)
```

```javascript Node theme={null}
import Olostep from "olostep";

const client = new Olostep({ apiKey: process.env.OLOSTEP_API_KEY });

const results = await client.searches.create({ query: "latest Node.js release", limit: 5 });
for (const link of results.links) console.log(link.url, link.title);

const page = await client.scrapes.create({ url: "https://nodejs.org/en/blog", formats: ["markdown"] });
console.log(page.markdown_content.slice(0, 500));

const answer = await client.answers.create({
  task: "What is the latest Node.js LTS version?",
  jsonFormat: { version: "" },
});
console.log(JSON.parse(answer.json_content), answer.sources);
```

***

## HTTP-API-Referenz

### Suche

```bash Exa theme={null}
curl -X POST https://api.exa.ai/search \
  -H "x-api-key: $EXA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "latest Node.js release",
    "numResults": 5,
    "includeDomains": ["nodejs.org"]
  }'
```

```bash Olostep theme={null}
curl -X POST https://api.olostep.com/v1/searches \
  -H "Authorization: Bearer $OLOSTEP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "latest Node.js release",
    "limit": 5,
    "include_domains": ["nodejs.org"]
  }'
```

**Anfrageparameter**

| Exa | Olostep |
| - | - |
| `query` | `query` |
| `numResults` (1–100, Standard 10) | `limit` (**1–25**, Standard 12) |
| `includeDomains` / `excludeDomains` | `include_domains` / `exclude_domains` (nur Hosts wie `nodejs.org`; Exa akzeptiert auch Pfadpräfixe und Wildcards) |
| `type: "fast"` / `"instant"` / `"lite"` | `fast_mode: true` |
| `type: "auto"` | Standard (weglassen) |
| `type: "deep"` / `"deep-lite"` | verwende `POST /answers` für eine recherchierte Antwort |
| `category: "company"` | `category: { "type": "companies" }` (Unternehmenssuche, 40 Credits) |
| `category: "people"` | `category: { "type": "people" }` (Personensuche, 40 Credits) |
| `category` (andere Werte) | kein Äquivalent: platziere das Thema in `query` |
| `startPublishedDate` / `endPublishedDate` | kein Äquivalent: füge den Zeitrahmen zu `query` hinzu (z.B. "im Jahr 2026") |
| `userLocation` | kein Äquivalent bei der Suche |
| `outputSchema`, `systemPrompt` | verwende `POST /answers` mit `json_format` |
| `contents.text` | `scrape_options: { "formats": ["markdown"], "timeout": 45 }` |
| `contents.highlights`, `contents.summary` | kein Äquivalent |
| `contents.maxAgeHours`, `livecrawl` | entfernen: Olostep ruft Seiten live ab |
| — | `zero_data_retention: true` (speichere die Anfrage oder Ergebnisse nicht) |

**Antwort**

| Exa | Olostep |
| - | - |
| `results[]` | `result.links[]` |
| `results[].url`, `title` | `result.links[].url`, `title` |
| `results[].text` | `result.links[].markdown_content` (mit `scrape_options`) |
| `results[].publishedDate` | `result.links[].published_at` (oft `null`) |
| `results[].id`, `score`, `author`, `image`, `favicon` | kein Äquivalent |
| `requestId` | `id` |
| `costDollars.total` | `credits_consumed` |

### Suche mit Seitentext

`scrape_options` scrapt jedes Ergebnis parallel und fügt dessen Markdown dem Link hinzu. `timeout` (Sekunden, 1–60, Standard 25) begrenzt die gesamte Scrape-Phase: Links, die bis dahin nicht fertig sind, kommen mit `markdown_content: null` zurück. Seiten rendern mit JavaScript, daher kann dies 30 Sekunden oder mehr dauern. Setze `timeout` auf 45–60 und gehe mit `null`-Inhalten um.

```json theme={null}
{
  "query": "latest Node.js release",
  "limit": 5,
  "scrape_options": { "formats": ["markdown"], "timeout": 45 }
}
```

Wenn die Antwortzeit wichtiger ist als jede Seite zu haben, suche zuerst und rufe `POST /scrapes` nur für die Ergebnisse auf, die du verwendest.

### Inhalte → Scrape

Exas `/contents` akzeptiert bis zu 100 URLs in einem Aufruf. Olostep scrapt eine URL pro Aufruf: Sende sie parallel oder verwende [Batches](https://docs.olostep.com/features/batches.md) für große Listen (bis zu 100.000 URLs pro Batch).

```bash Exa theme={null}
curl -X POST https://api.exa.ai/contents \
  -H "x-api-key: $EXA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "urls": ["https://nodejs.org/en/blog"], "text": true }'
```

```bash Olostep theme={null}
curl -X POST https://api.olostep.com/v1/scrapes \
  -H "Authorization: Bearer $OLOSTEP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url_to_scrape": "https://nodejs.org/en/blog", "formats": ["markdown"] }'
```

| Exa | Olostep |
| - | - |
| `urls[]` (oder `ids[]`) | `url_to_scrape` (eine URL pro Aufruf) |
| `text: true` | `formats: ["markdown"]` (oder `["text"]` für reinen Text) |
| `text.maxCharacters` | kein Äquivalent: kürze `markdown_content` selbst |
| `text.includeHtmlTags: true` | `formats: ["html"]` |
| `extras.links` | `links_on_page: {}` |
| `subpages` / `subpageTarget` | `POST /crawls` mit `start_url` und `max_pages` |
| `maxAgeHours`, `livecrawl`, `livecrawlTimeout` | entfernen: Olostep ruft Seiten live ab; verwende `wait_before_scraping` (ms) für langsame Seiten |
| Antwort `results[].text` | `result.markdown_content` (oder `result.text_content`) |
| Antwort `statuses[].status: "error"` | der Scrape-Aufruf gibt einen Fehlerstatus für diese URL zurück |

### Antwort → Antworten

```bash Exa theme={null}
curl -X POST https://api.exa.ai/answer \
  -H "x-api-key: $EXA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What is the latest Node.js LTS version?",
    "outputSchema": {
      "type": "object",
      "properties": { "version": { "type": "string" } }
    }
  }'
```

```bash Olostep theme={null}
curl -X POST https://api.olostep.com/v1/answers \
  -H "Authorization: Bearer $OLOSTEP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "task": "What is the latest Node.js LTS version?",
    "json_format": { "version": "" }
  }'
```

| Exa | Olostep |
| - | - |
| `query` | `task` |
| `outputSchema` (JSON Schema) | `json_format`: ein Beispielobjekt mit leeren Werten (`{ "version": "" }`) oder eine Beschreibung im Klartext |
| `systemPrompt` | platziere die Anweisungen in `task` |
| `text: true` (vollständiger Text der Zitate) | kein Äquivalent: scrape die Quell-URLs |
| `stream: true` | kein Äquivalent: Antworten kommen in einer Antwort zurück (3–30 s) |
| `model` | kein Äquivalent |
| Antwort `answer` (String oder Objekt) | `result.json_content` (**String**: parse es). Ohne `json_format` ist es `{"result": "..."}` |
| Antwort `citations[]` (`url`, `title`, ...) | `result.sources[]` (URL-Strings) |

***

## Nicht eins zu eins abgedeckt

Diese Exa-Funktionen haben kein direktes Olostep-Äquivalent: Filter für Veröffentlichungsdaten, `highlights` und `summary` Inhalte, Websets, Streaming-Antworten, Suchergebnis `score` und Suche nach Exa-Ergebnis `ids`. Für Recherchen, die über viele Schritte laufen, siehe [Agents](https://docs.olostep.com/features/agents.md).

## Migration überprüfen

1. Keine Exa-Importe, -Pakete oder `EXA_API_KEY`-Lesungen sind übrig: Suche den Code nach `exa_py`, `exa-js` und `api.exa.ai`.
2. `OLOSTEP_API_KEY` ist überall dort gesetzt, wo die App läuft (lokales `.env`, CI-Geheimnisse, Produktion).
3. Code, der `.results[].text` gelesen hat, übergibt entweder `scrape_options` oder scrapt die benötigten URLs und verarbeitet `null`-Inhalte.
4. Suchen fragen nach 25 oder weniger Ergebnissen.
5. Antwortergebnisse werden geparst: Olostep gibt `json_content` als String zurück und Quellen als URL-Strings.
6. Führe eine Suche, ein Scrape und eine Antwort von Anfang bis Ende aus, bevor du bereitstellst.

## Links

* [Olostep API-Referenz](https://docs.olostep.com/api-reference/searches/create.md)
* [Olostep SDKs (Python / Node)](https://docs.olostep.com/sdks/overview.md)
* [Migration von Context.dev](https://docs.olostep.com/migrate/context-dev.md)


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