Natural Language Dataset Query

Natural Language Dataset Query

by apify

Use natural language queries to retrieve results from an Apify dataset. This Actor provides a query engine that loads a dataset, executes SQL queries,...

6 runs
3 users
Try This Actor

Opens on Apify.com

About Natural Language Dataset Query

Use natural language queries to retrieve results from an Apify dataset. This Actor provides a query engine that loads a dataset, executes SQL queries, and synthesizes results. It works as an MCP (Model Context Protocol) server or REST API in Actor standby mode.

What does this actor do?

Natural Language Dataset Query is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.

Key Features

  • Cloud-based execution - no local setup required
  • Scalable infrastructure for large-scale operations
  • API access for integration with your applications
  • Built-in proxy rotation and anti-blocking measures
  • Scheduled runs and webhooks for automation

How to Use

  1. Click "Try This Actor" to open it on Apify
  2. Create a free Apify account if you don't have one
  3. Configure the input parameters as needed
  4. Run the actor and download your results

Documentation

Natural Language Dataset Query This Actor enables you to run natural language queries against an Apify dataset. For example, after running a web scraping Actor, you can ask this Actor how many pages contain a specific keyword. It supports queries via MCP (Model Control Protocol) and REST API in Standby mode, or traditional usage through the Apify Console. > â„šī¸ Notice: > This Actor internally uses the Apify Openrouter Actor to call an LLM. You will be billed for LLM usage through this Actor. ## âš™ī¸ How does it work? This Actor uses LLMs to understand your query, generate an SQL statement, and report the results. First, the Actor retrieves the dataset items and builds an internal schema representation, which is converted into an in-memory SQLite3 database. Then, the LLM generates an SQL query and executes it against the SQLite3 database. Finally, it summarizes the results and returns them to you. If your dataset is, for example, the result of the RAG Web Browser Actor, you can ask questions like: - "How many pages contain the keyword 'Apify'?" This Actor will then generate the following SQL query to retrieve that information: sql SELECT COUNT(*) AS "PagesWithKeyword" FROM 'dataset' WHERE "markdown" LIKE '%apify%' It will then synthesize the result into a human-readable answer, such as: - The number of pages containing the keyword "apify" is 4. ## 🚀 Usage ### đŸŸĸ Normal Actor mode You can run the Actor "normally" via the Apify API, schedule, integrations, or manually in the Apify Console. At the start, you provide input via the UI or as a JSON object and run the Actor. > â„šī¸ Notice: > This mode is highly inefficient for a large number of queries against a single dataset, as the Actor will always re-fetch the dataset and rebuild the SQLite3 database. For more efficient querying, run the Actor in Standby mode. ### 💤 Standby (REST API) mode The Actor supports Standby mode, where it runs an HTTP server that processes queries on demand. This mode eliminates the need to re-fetch the dataset and rebuild the SQLite3 database for each query against a single dataset, making it much more efficient for multiple queries against the same dataset. To run the Actor in Standby mode, send an HTTP GET request to the Actor's URL with the following query parameters: - dataset: The ID of the dataset you want to query. - query: The natural language query you want to run against the dataset. - modelName: (optional) The name of the LLM model you want to use for the query. If not provided, the Actor will use the default model defined in the Actor input. See the Actor input schema for a list of available models. In most cases, the Google Gemini models work best for this Actor. text https://natural-language-dataset-query.apify.actor/?token=YOUR_APIFY_TOKEN&dataset=DATASET_ID&query=YOUR_QUERY ### 🖧 MCP server mode You can run the Actor in MCP server mode to process queries via the MCP protocol. This enables integration with MCP clients for advanced, potentially agentic workflows. To connect, use your MCP client and point it to: text https://natural-language-dataset-query.apify.actor/mcp If you are using a legacy MCP client that only supports SSE transport, you can connect to: text https://natural-language-dataset-query.apify.actor/sse > â„šī¸ Notice: > The MCP server supports OAuth authentication. If your client supports it, you can simply connect and go through the OAuth flow to authenticate. If you prefer, or if your client does not support OAuth, you need to either pass the ?token=YOUR_APIFY_TOKEN query parameter in the request URL or set the Authorization header to Bearer YOUR_APIFY_TOKEN. ## 💸 Pricing This Actor charges you for Apify platform compute and LLM usage, depending on the model you choose. You can verify the LLM model pricing on OpenRouter. For a simple query, this will cost you around $0.007 per normal Actor run.

Common Use Cases

Market Research

Gather competitive intelligence and market data

Lead Generation

Extract contact information for sales outreach

Price Monitoring

Track competitor pricing and product changes

Content Aggregation

Collect and organize content from multiple sources

Ready to Get Started?

Try Natural Language Dataset Query now on Apify. Free tier available with no credit card required.

Start Free Trial

Actor Information

Developer
apify
Pricing
Paid
Total Runs
6
Active Users
3
Apify Platform

Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.

Learn more about Apify

Need Professional Help?

Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.

Find a Specialist

Trusted by millions | Money-back guarantee | 24/7 Support