# Diccionario de la Real Academia de la Lengua Española RAE (R) (`sonirico/diccioanrio-de-la-real-academia-de-la-lengua-espanola-rae-r`) Actor

Accede a definiciones oficiales del español directamente en formato JSON. Obtén significados, categorías gramaticales y usos de cualquier palabra. Ideal para aplicaciones educativas, correctores y análisis lingüístico.

- **URL**: https://apify.com/sonirico/diccioanrio-de-la-real-academia-de-la-lengua-espanola-rae-r.md
- **Developed by:** [Marquiños](https://apify.com/sonirico) (community)
- **Categories:** Automation, Developer tools, Integrations
- **Security:** Full permissions
- **Stats:** 4 total users, 0 monthly users, 100.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

## 📚 **RAE API Actor for Apify**

A powerful Actor for accessing the Real Academia Española (RAE) dictionary and retrieving structured data such as definitions, conjugations, synonyms, antonyms, and more. This Actor is built to integrate easily with your applications, games, and research tools.

### Included features

- **[Apify SDK](https://docs.apify.com/sdk/js/)** - A toolkit for building [Actors](https://apify.com/actors) on the Apify platform.
- **[Input schema](https://docs.apify.com/platform/actors/development/input-schema)** - Define and validate a schema for your Actor's input.
- **[Dataset](https://docs.apify.com/sdk/js/docs/guides/result-storage#dataset)** - Store structured data where each object stored has the same attributes.
- **[RAE API](https://rae-api.com)** - Retrieve linguistic data from the Real Academia Española dictionary.
- **[JSON Output](https://docs.apify.com/sdk/js/docs/guides/result-storage#dataset)** - Structured data formatted for easy parsing and integration.

### How it works

1. `Actor.getInput()` retrieves the input where the word to be queried is defined.
2. The Actor fetches structured data related to the word, including:
   - Definitions
   - Conjugations
   - Synonyms and Antonyms
   - Word origin
3. The retrieved data is then stored in the **Apify Dataset** using `Actor.pushData()`.
4. The structured JSON output can be used for various purposes, including word games, educational tools, and research.

Example input:

```json
{
    "word": "hablar"
}
```

Example output:

```json
{
  "word": "hablar",
  "meanings": [
    {
      "origin": {
        "raw": "Del lat. fabulāri.",
        "type": "lat",
        "text": "fabulāri"
      },
      "senses": [
        {
          "raw": "1. intr. Emitir palabras.",
          "meaning_number": 1,
          "category": "verb",
          "synonyms": ["balbucir", "tartamudear"],
          "antonyms": ["callar"]
        }
      ]
    }
  ],
  "conjugations": {
    "non_personal": {
      "infinitive": "hablar",
      "participle": "hablado",
      "gerund": "hablando"
    }
  }
}
```

### Resources

- [Web scraping with Apify SDK](https://docs.apify.com/sdk/js)
- [Using Apify Datasets](https://docs.apify.com/sdk/js/docs/guides/result-storage#dataset)
- [Building Actors on Apify](https://docs.apify.com/platform/actors/development)
- [RAE API Documentation](https://rae-api.com)
- [Integration with tools like Zapier, Make, and Google Drive](https://apify.com/integrations)
- [Video guide on using Apify API](https://www.youtube.com/watch?v=ViYYDHSBAKM)

### Getting started

To build and run this Actor on Apify:

1. **Build the Actor**:
   ```bash
   apify build
   ```

2. **Run the Actor**:
   ```bash
   apify run
   ```

### Pull the Actor for local development

If you would like to develop locally, you can pull the existing Actor from Apify Console using Apify CLI:

1. **Install `apify-cli`**

   Using Homebrew:

   ```bash
   brew install apify-cli
   ```

   Using NPM:

   ```bash
   npm -g install apify-cli
   ```

2. **Pull the Actor by its unique `<ActorId>`**:
   ```bash
   apify pull <ActorId>
   ```
   Replace `<ActorId>` with the unique name or ID of your Actor.

### Documentation reference

To learn more about Apify and building Actors, take a look at the following resources:

- [Apify SDK for JavaScript documentation](https://docs.apify.com/sdk/js)
- [Apify SDK for Python documentation](https://docs.apify.com/sdk/python)
- [Apify Platform documentation](https://docs.apify.com/platform)
- [Join our developer community on Discord](https://discord.com/invite/jyEM2PRvMU)

# Actor input Schema

## `word` (type: `string`):

Palabra en español para buscar en el diccionario de la RAE (PPR)

## Actor input object example

```json
{
  "word": "hola"
}
```

# 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 = {
    "word": "hola"
};

// Run the Actor and wait for it to finish
const run = await client.actor("sonirico/diccioanrio-de-la-real-academia-de-la-lengua-espanola-rae-r").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 = { "word": "hola" }

# Run the Actor and wait for it to finish
run = client.actor("sonirico/diccioanrio-de-la-real-academia-de-la-lengua-espanola-rae-r").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 '{
  "word": "hola"
}' |
apify call sonirico/diccioanrio-de-la-real-academia-de-la-lengua-espanola-rae-r --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sonirico/diccioanrio-de-la-real-academia-de-la-lengua-espanola-rae-r"
        }
    }
}
```

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/wZehK3XN8eg2sln0m/builds/aALH5HqizMwnxNfK9/openapi.json
