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

# Migrate from Exa to Olostep

> Endpoint, SDK, parameter and response mapping for moving code from Exa search, contents and answer to Olostep, written so a coding agent can do the switch.

Exa's `/search`, `/contents` and `/answer` map to Olostep's [Search](https://docs.olostep.com/features/search.md), [Scrape](https://docs.olostep.com/features/scrapes.md) and [Answers](https://docs.olostep.com/features/answers.md). Switching takes the SDK or base URL, the API key, and a few parameter names.

> [!TIP]
>
> **Using a coding agent?** Give it this prompt:
>
> ```text theme={null}
> Migrate this codebase from Exa to Olostep. Follow
> https://docs.olostep.com/migrate/exa.md exactly: swap the SDK and API key, map every
> Exa call to its Olostep equivalent, and update the code that reads the responses.
> Read OLOSTEP_API_KEY from the environment. List anything with no Olostep equivalent
> instead of guessing.
> ```

## Quick swap

| | Exa | Olostep |
| - | - | - |
| Python package | `pip install exa-py` | `pip install olostep` |
| Node package | `npm install exa-js` | `npm install olostep` |
| API key variable | `EXA_API_KEY` | `OLOSTEP_API_KEY` |
| Base URL | `https://api.exa.ai` | `https://api.olostep.com/v1` |
| Auth header | `x-api-key: ...` (or `Authorization: Bearer ...`) | `Authorization: Bearer $OLOSTEP_API_KEY` |
| Field style | camelCase | snake\_case in HTTP and Python, camelCase options in Node |

Get a key at [olostep.com/auth](https://www.olostep.com/auth). New accounts get 500 free credits.

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

# After
from olostep import Olostep
client = Olostep()  # reads OLOSTEP_API_KEY
```

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

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

## Endpoint map

| Exa | Olostep | Notes |
| - | - | - |
| `POST /search` | `POST /searches` | Up to 25 results per call (Exa: 100) |
| `POST /search` with `contents.text` | `POST /searches` with `scrape_options` | Page markdown on each result. See [Search with page text](#search-with-page-text) |
| `POST /contents` | `POST /scrapes` (one URL), or `POST /batches` (many) | One scrape per URL; Olostep has no multi-URL scrape call |
| `POST /answer` | `POST /answers` | Synchronous; sources are URLs |
| `POST /findSimilar` (deprecated) | `POST /searches` | Describe the page in `query` (Exa's own advice) |
| Agent API, `/research` (removed) | `POST /answers` for one question; [Agents](https://docs.olostep.com/features/agents.md) for longer research | |
| Websets, Monitors | [Monitors](https://docs.olostep.com/features/monitors.md) for watching a topic or page | No equivalent for websets |

## SDK method map

| 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"])` per URL | `client.scrapes.create({ url, formats: ["markdown"] })` per URL |
| `exa.answer(query, output_schema=...)` | `exa.answer(query, { outputSchema })` | `client.answers.create(task=query, json_format={...})` | `client.answers.create({ task: query, jsonFormat: {...} })` |

> [!WARNING]
>
> Exa's SDKs return page text from `search()` by default (up to 10,000 characters per result). Olostep's search returns titles, URLs and descriptions only. If your code reads `result.text` after a plain `search()`, add `scrape_options` (see below), or scrape the results you need.

**Reading the results**

| 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"]` (with `scrape_options`) | `link.markdown_content` |
| `result.highlights`, `result.summary` | no equivalent: use `link["description"]`, or Answers | `link.description` |
| `contents.results[0].text` | `page.markdown_content` from `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]` |

### Example

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

client = Olostep()  # reads 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 reference

### Search

```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"]
  }'
```

**Request parameters**

| Exa | Olostep |
| - | - |
| `query` | `query` |
| `numResults` (1–100, default 10) | `limit` (**1–25**, default 12) |
| `includeDomains` / `excludeDomains` | `include_domains` / `exclude_domains` (bare hosts such as `nodejs.org`; Exa also accepts path prefixes and wildcards) |
| `type: "fast"` / `"instant"` / `"lite"` | `fast_mode: true` |
| `type: "auto"` | default (omit) |
| `type: "deep"` / `"deep-lite"` | use `POST /answers` for a researched answer |
| `category: "company"` | `category: { "type": "companies" }` (company search, 40 credits) |
| `category: "people"` | `category: { "type": "people" }` (people search, 40 credits) |
| `category` (other values) | no equivalent: put the topic in `query` |
| `startPublishedDate` / `endPublishedDate` | no equivalent: add the time frame to `query` (e.g. "in 2026") |
| `userLocation` | no equivalent on search |
| `outputSchema`, `systemPrompt` | use `POST /answers` with `json_format` |
| `contents.text` | `scrape_options: { "formats": ["markdown"], "timeout": 45 }` |
| `contents.highlights`, `contents.summary` | no equivalent |
| `contents.maxAgeHours`, `livecrawl` | remove: Olostep fetches pages live |
| — | `zero_data_retention: true` (don't store the query or results) |

**Response**

| Exa | Olostep |
| - | - |
| `results[]` | `result.links[]` |
| `results[].url`, `title` | `result.links[].url`, `title` |
| `results[].text` | `result.links[].markdown_content` (with `scrape_options`) |
| `results[].publishedDate` | `result.links[].published_at` (often `null`) |
| `results[].id`, `score`, `author`, `image`, `favicon` | no equivalent |
| `requestId` | `id` |
| `costDollars.total` | `credits_consumed` |

### Search with page text

`scrape_options` scrapes every result in parallel and puts its markdown on the link. `timeout` (seconds, 1–60, default 25) bounds the whole scrape phase: links that haven't finished by then come back with `markdown_content: null`. Pages render with JavaScript, so this can take 30 seconds or more. Set `timeout` to 45–60 and handle `null` content.

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

When response time matters more than having every page, search first and call `POST /scrapes` only for the results you use.

### Contents → Scrape

Exa's `/contents` takes up to 100 URLs in one call. Olostep scrapes one URL per call: send them in parallel, or use [Batches](https://docs.olostep.com/features/batches.md) for large lists (up to 100,000 URLs per 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[]` (or `ids[]`) | `url_to_scrape` (one URL per call) |
| `text: true` | `formats: ["markdown"]` (or `["text"]` for plain text) |
| `text.maxCharacters` | no equivalent: truncate `markdown_content` yourself |
| `text.includeHtmlTags: true` | `formats: ["html"]` |
| `extras.links` | `links_on_page: {}` |
| `subpages` / `subpageTarget` | `POST /crawls` with `start_url` and `max_pages` |
| `maxAgeHours`, `livecrawl`, `livecrawlTimeout` | remove: Olostep fetches pages live; use `wait_before_scraping` (ms) for slow pages |
| Response `results[].text` | `result.markdown_content` (or `result.text_content`) |
| Response `statuses[].status: "error"` | the scrape call returns an error status for that URL |

### Answer → Answers

```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`: an example object with empty values (`{ "version": "" }`), or a plain-text description |
| `systemPrompt` | put the instructions in `task` |
| `text: true` (full text of citations) | no equivalent: scrape the source URLs |
| `stream: true` | no equivalent: answers return in one response (3–30 s) |
| `model` | no equivalent |
| Response `answer` (string or object) | `result.json_content` (**string**: parse it). Without `json_format`, it is `{"result": "..."}` |
| Response `citations[]` (`url`, `title`, ...) | `result.sources[]` (URL strings) |

***

## Not covered one-to-one

These Exa features have no direct Olostep equivalent: published-date filters, `highlights` and `summary` contents, websets, streaming answers, search result `score`, and searching by Exa result `ids`. For research that runs over many steps, see [Agents](https://docs.olostep.com/features/agents.md).

## Verify the migration

1. No Exa imports, packages or `EXA_API_KEY` reads are left: search the code for `exa_py`, `exa-js` and `api.exa.ai`.
2. `OLOSTEP_API_KEY` is set wherever the app runs (local `.env`, CI secrets, production).
3. Code that read `.results[].text` either passes `scrape_options` or scrapes the URLs it needs, and handles `null` content.
4. Searches ask for 25 results or fewer.
5. Answer results are parsed: Olostep returns `json_content` as a string, and sources as URL strings.
6. Run one search, one scrape and one answer end to end before deploying.

## Links

* [Olostep API reference](https://docs.olostep.com/api-reference/searches/create.md)
* [Olostep SDKs (Python / Node)](https://docs.olostep.com/sdks/overview.md)
* [Migrate from 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.