# Olostep Web Scraper (`olostep/olostep-web-scraper`) Actor

Automate web search, scraping and crawling with Apify Actors using Olostep — the API to search, extract and structure web data for your workflows.

- **URL**: https://apify.com/olostep/olostep-web-scraper.md
- **Developed by:** [Olostep](https://apify.com/olostep) (community)
- **Categories:** Agents, Automation, Developer tools
- **Security:** Full permissions
- **Stats:** 4 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Olostep Web Scraper - Apify Actor

Official Apify Actor for Olostep — a Web search, scraping and crawling API; an API to search, extract and structure web data. Extract content from any website in multiple formats (Markdown, HTML, JSON, or plain text) with support for single page scraping, batch processing, website crawling, and URL mapping.

### Overview

This Actor integrates Olostep's Web search, scraping and crawling capabilities into the Apify platform, allowing you to:

- **Scrape single websites** - Extract content from any URL
- **Batch process URLs** - Scrape up to 100,000 URLs in parallel
- **Crawl websites** - Automatically discover and scrape linked pages
- **Map websites** - Extract all URLs from a website for structure analysis
- **AI-powered Answers** - Ask natural-language questions and get structured JSON answers with sources

### Features

- ✅ Multiple output formats (Markdown, HTML, JSON, Text)
- ✅ JavaScript rendering support with configurable wait times
- ✅ Country-specific scraping
- ✅ Specialized parsers for popular websites (Amazon, Google, etc.)
- ✅ Batch processing for large-scale data extraction
- ✅ Website crawling with link following
- ✅ URL mapping and discovery
- ✅ Integration-ready design for Apify workflows

### Input

The Actor accepts the following input parameters:

#### Required Fields

- **operation** (string): Operation type - `scrape`, `batch`, `crawl`, or `map`
- **apiKey** (string): Your Olostep API key from [olostep.com/dashboard](https://olostep.com/dashboard)

#### Operation-Specific Fields

##### Scrape Operation

- **url_to_scrape** (string, required): URL to scrape
- **formats** (string): Output format - `html`, `markdown`, `json`, or `text` (default: `markdown`)
- **country** (string): Country code for location-specific scraping (e.g., `US`, `GB`, `CA`)
- **wait_before_scraping** (integer): Wait time in milliseconds for JavaScript rendering
- **parser** (string): Parser ID for specialized extraction (e.g., `@olostep/amazon-product`)

##### Batch Operation

- **batch_array** (string, required): JSON array of objects with `url` and optional `custom_id`
  - Example: `[{"url":"https://example.com","custom_id":"site1"}]`
- **formats** (string): Output format
- **country** (string): Country code
- **wait_before_scraping** (integer): Wait time in milliseconds
- **parser** (string): Parser ID

##### Crawl Operation

- **start_url** (string, required): Starting URL for the crawl
- **max_pages** (integer): Maximum number of pages to crawl (default: `10`)
- **follow_links** (boolean): Whether to follow links (default: `true`)
- **formats** (string): Output format
- **country** (string): Country code
- **parser** (string): Parser ID

##### Map Operation

- **website_url** (string, required): Website URL to extract links from
- **search_query** (string): Optional search query to filter URLs
- **top\_n** (integer): Limit the number of URLs returned
- **include_patterns** (string): Glob patterns to include (e.g., `/blog/**`)
- **exclude_patterns** (string): Glob patterns to exclude (e.g., `/admin/**`)

### Output

The Actor outputs data to the default dataset. Output format varies by operation:

#### Scrape Output

```json
{
  "id": "scrape_abc123",
  "url": "https://example.com",
  "status": "completed",
  "formats": "markdown",
  "markdown_content": "# Example Content\n\n...",
  "html_content": "<h1>Example Content</h1>...",
  "json_content": "{...}",
  "text_content": "Example Content...",
  "markdown_hosted_url": "https://...",
  "page_metadata": "{...}"
}
```

#### Batch Output

```json
{
  "batch_id": "batch_xyz789",
  "status": "processing",
  "total_urls": 100,
  "formats": "markdown",
  "urls": [
    {"custom_id": "site1", "url": "https://example.com"}
  ]
}
```

#### Crawl Output

```json
{
  "crawl_id": "crawl_def456",
  "status": "in_progress",
  "start_url": "https://example.com",
  "max_pages": 10,
  "follow_links": true,
  "formats": "markdown"
}
```

#### Map Output

```json
{
  "map_id": "map_ghi789",
  "website_url": "https://example.com",
  "total_urls": 150,
  "urls": ["https://example.com/page1", "https://example.com/page2", ...]
}
```

### Usage Examples

#### Example 1: Scrape a Single Website

```json
{
  "operation": "scrape",
  "apiKey": "your-api-key",
  "url_to_scrape": "https://example.com",
  "formats": "markdown",
  "country": "US"
}
```

#### Example 2: Batch Scrape Multiple URLs

```json
{
  "operation": "batch",
  "apiKey": "your-api-key",
  "batch_array": "[{\"url\":\"https://example.com\",\"custom_id\":\"site1\"},{\"url\":\"https://test.com\",\"custom_id\":\"site2\"}]",
  "formats": "json",
  "parser": "@olostep/amazon-product"
}
```

#### Example 3: Crawl a Website

```json
{
  "operation": "crawl",
  "apiKey": "your-api-key",
  "start_url": "https://example.com",
  "max_pages": 50,
  "follow_links": true,
  "formats": "markdown"
}
```

#### Example 4: Map a Website

```json
{
  "operation": "map",
  "apiKey": "your-api-key",
  "website_url": "https://example.com",
  "include_patterns": "/blog/**",
  "top_n": 100
}
```

#### Example 5: AI-powered Answers

```json
{
  "operation": "answers",
  "apiKey": "your-api-key",
  "task": "What is the latest funding round of Olostep? Provide company, round, date, amount.",
  "json": "{\"company\":\"\",\"round\":\"\",\"date\":\"\",\"amount\":\"\"}"
}
```

### Integration with Other Actors

This Actor is designed to work seamlessly with other Apify Actors:

- **Input from other Actors**: Use the `payload` field to receive data from triggering actors
- **Output to other Actors**: Output data is stored in the default dataset, accessible by other actors
- **Workflow Integration**: Chain multiple actors together for complex data extraction workflows

### Specialized Parsers

Olostep provides pre-built parsers for popular websites:

- `@olostep/amazon-product` - Amazon product pages
- `@olostep/google-search` - Google search results
- `@olostep/google-maps` - Google Maps listings

Explore additional parsers in the Olostep Store: https://www.olostep.com/store

### Error Handling

The Actor handles common errors:

- **401 Unauthorized**: Invalid API key
- **429 Too Many Requests**: Rate limit exceeded
- **500 Internal Server Error**: Olostep service error
- **Network Errors**: Connection issues with detailed error messages

### Pricing

Olostep charges based on API usage, independent of Apify:

- **Scrapes**: Pay per scrape
- **Batches**: Pay per URL in batch
- **Crawls**: Pay per page crawled
- **Maps**: Pay per map operation

Check current pricing at [olostep.com/pricing](https://olostep.com/pricing).

### Support

- **Documentation**: [docs.olostep.com](https://docs.olostep.com)
- **Support**: [olostep.com/support](https://olostep.com/support)
- **API Dashboard**: [olostep.com/dashboard](https://olostep.com/dashboard)

### License

MIT License

***

**Ready to scrape the web?** Get your API key from [olostep.com/dashboard](https://olostep.com/dashboard) and start extracting data today!

# Actor input Schema

## `operation` (type: `string`):

Select which Olostep operation to perform

## `apiKey` (type: `string`):

Your Olostep API key. Get it from https://olostep.com/dashboard

## `url_to_scrape` (type: `string`):

The URL of the website to scrape (required for 'scrape' operation)

## `formats` (type: `string`):

Format for the scraped content output

## `country` (type: `string`):

Optional country code (e.g., US, GB, CA) for location-specific scraping

## `wait_before_scraping` (type: `integer`):

Wait time in milliseconds before scraping (useful for dynamic content)

## `parser` (type: `string`):

Optional parser ID for specialized content extraction (e.g., @olostep/amazon-product)

## `batch_array` (type: `string`):

JSON array of objects with 'url' and optional 'custom_id' fields (required for 'batch' operation). Example: \[{"url":"https://example.com","custom_id":"site1"}]

## `start_url` (type: `string`):

The starting URL for the crawl (required for 'crawl' operation)

## `max_pages` (type: `integer`):

Maximum number of pages to crawl

## `follow_links` (type: `boolean`):

Whether to follow links found on pages

## `website_url` (type: `string`):

Website URL to extract links from (required for 'map' operation)

## `search_query` (type: `string`):

Optional search query to filter URLs

## `top_n` (type: `integer`):

Limit the number of URLs returned

## `include_patterns` (type: `string`):

Glob patterns to include specific paths (e.g., /blog/\*\*)

## `exclude_patterns` (type: `string`):

Glob patterns to exclude specific paths (e.g., /admin/\*\*)

## `task` (type: `string`):

Question or task to answer using web data (required for 'answers' operation).

## `json` (type: `string`):

Optional JSON schema/object or short description of the desired output. Example: {"company":"","round":"","date":"","amount":""}

## Actor input object example

```json
{
  "operation": "scrape",
  "url_to_scrape": "https://example.com",
  "formats": "markdown",
  "country": "US",
  "wait_before_scraping": 2000,
  "parser": "@olostep/amazon-product",
  "batch_array": "[{\"url\":\"https://example.com\",\"custom_id\":\"site1\"}]",
  "start_url": "https://example.com",
  "max_pages": 10,
  "follow_links": true,
  "website_url": "https://example.com",
  "search_query": "blog",
  "top_n": 100,
  "include_patterns": "/blog/**",
  "exclude_patterns": "/admin/**",
  "task": "What is the latest funding round of Olostep?",
  "json": "{\"company\":\"\",\"round\":\"\",\"date\":\"\",\"amount\":\"\"}"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("olostep/olostep-web-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("olostep/olostep-web-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call olostep/olostep-web-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,olostep/olostep-web-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/PLjkxK8K4A7nUDYit/builds/b1gbE5hzTqNtwkdrz/openapi.json
