# Nature Journal Search Scraper (`searchapi/nature-search-results-scraper`) Actor

Searches the live Nature website by query, journal, article type, subject, date range, and sort order, with optional Crossref DOI metadata enrichment.

- **URL**: https://apify.com/searchapi/nature-search-results-scraper.md
- **Developed by:** [Search API](https://apify.com/searchapi) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 search results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

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

## Nature Search Results Scraper

Search the live [Nature website](https://www.nature.com/search) with the same query, journal, article-type, subject, date-range, and sort controls available in its public search form. The Actor extracts server-rendered scholarly article cards and can enrich their verified `10.1038` DOIs through Crossref's public REST API.

### Input

- `searchQuery`: keywords entered into Nature search.
- `journal`: one supported Nature Portfolio journal or `all`.
- `articleTypes` and `subjects`: optional current Nature filter codes; empty means all.
- `dateRange`: Nature's native relative date filter.
- `sortBy`: relevance, newest first, or oldest first.
- `maxItems`, `maxPages`, concurrency, retry, timeout, and optional proxy controls.
- `includeCrossrefMetadata`: adds DOI, citation/reference counts, volume/issue/pages, publisher, license, language, ISSNs, and Crossref subjects when available.
- `fromYear` and `toYear`: retained as legacy local filters. Nature does not expose custom year bounds in its standard search form, so completeness is reported explicitly when a bounded scan cannot cover every matching Nature page.

`maxResults` remains a backward-compatible alias for `maxItems`. The former `citations` sort is intentionally removed because Nature's current search form does not offer it; use relevance or publication date.

### Output

Every record has a stable Nature article URL ID, contiguous position, title, open-access flag, the exact applied filter values, source page/URL, and timestamp. Available descriptions, authors, article type, publication date, journal, volume/page text, and verified Crossref metadata are included without null or placeholder fields.

The Actor validates final host, status, content type, body size, filter-preserving URL, total counts, result-card structure, Crossref JSON shape, and DOI identity before writing anything. It deduplicates by canonical Nature URL and writes atomically. CAPTCHAs, malformed payloads, and selector drift fail closed; genuine no-results searches complete with an empty dataset.

No raw Crossref payloads, cookies, headers, proxy URLs, contact email, or diagnostic placeholders are stored.

### Verification

```bash
npm install
npm test
npm audit --omit=dev
apify validate-schema
apify run --purge --input-file .actor/input.json
```

# Changelog

This Actor's version history is a separate document: https://apify.com/searchapi/nature-search-results-scraper/changelog.md

# Actor input Schema

## `searchQuery` (type: `string`):

Keywords to enter in Nature search.

## `journal` (type: `string`):

Restrict results to one Nature Portfolio journal, or use all.

## `articleTypes` (type: `array`):

Optional Nature article-type codes such as research, reviews, news, protocols, or editorial. Leave empty for all.

## `subjects` (type: `array`):

Optional Nature subject codes such as genetics, cancer, biotechnology, neuroscience, or plant-sciences. Leave empty for all.

## `dateRange` (type: `string`):

Nature's native relative publication-date filter.

## `fromYear` (type: `integer`):

Optional backward-compatible local year filter applied after Nature search. Use dateRange when possible.

## `toYear` (type: `integer`):

Optional backward-compatible local year filter applied after Nature search. Use dateRange when possible.

## `sortBy` (type: `string`):

Use Nature's relevance, newest-first, or oldest-first order.

## `maxItems` (type: `integer`):

Maximum unique Nature result records to write.

## `maxResults` (type: `integer`):

Backward-compatible alias for maxItems. maxItems takes precedence when both are provided.

## `maxPages` (type: `integer`):

Maximum 50-result Nature pages to inspect.

## `maxConcurrency` (type: `integer`):

Maximum simultaneous page or enrichment requests.

## `maxRequestRetries` (type: `integer`):

Bounded retries for temporary network, rate-limit, and server errors.

## `requestTimeoutSecs` (type: `integer`):

Maximum time allowed for each Nature or Crossref request.

## `includeCrossrefMetadata` (type: `boolean`):

Enrich verified Nature article DOIs with citation, reference, issue, page, publisher, subject, license, and language metadata.

## `crossrefMailto` (type: `string`):

Optional contact email for Crossref's polite pool. It is used only in requests and is never logged or stored.

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy or custom proxy configuration. Credentials are never logged or stored.

## `debug` (type: `boolean`):

Enable additional non-sensitive diagnostic logging.

## Actor input object example

```json
{
  "searchQuery": "CRISPR gene editing",
  "journal": "nature",
  "articleTypes": [],
  "subjects": [],
  "dateRange": "all",
  "sortBy": "relevance",
  "maxItems": 50,
  "maxPages": 10,
  "maxConcurrency": 3,
  "maxRequestRetries": 3,
  "requestTimeoutSecs": 30,
  "includeCrossrefMetadata": true,
  "debug": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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("searchapi/nature-search-results-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("searchapi/nature-search-results-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 searchapi/nature-search-results-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,searchapi/nature-search-results-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/uKCuisSvwQAtIpzoh/builds/jNPAEDfR73PiyXnth/openapi.json
