SQL Query
by useful-tools
Run SQL queries directly on your Apify Datasets. Filter, sort, and analyze your scraped data without leaving the platform.
Opens on Apify.com
About SQL Query
Ever wish you could just run a quick SQL query on your Apify datasets? That's exactly what this actor does. It's a straightforward tool that lets you use SQL to filter, sort, and analyze the data you've already scraped and stored in your Apify Datasets. Instead of manually sifting through JSON or using other tools, you can write a simple SELECT statement right here on the platform to get the specific data you need. I use it all the time to clean up results, extract particular fields before an analysis, or check the quality of a crawl. It currently works with Datasets, making it perfect for post-scraping data wrangling. Just connect your dataset, write your query, and get a clean output. It saves me the hassle of exporting data to another database just to run a basic query. If you're comfortable with SQL and use Apify Datasets regularly, this is a no-brainer for your workflow.
What does this actor do?
SQL 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
- Click "Try This Actor" to open it on Apify
- Create a free Apify account if you don't have one
- Configure the input parameters as needed
- Run the actor and download your results
Documentation
SQL Query Actor (Proof of Concept)
An Apify actor that lets you run SQL queries directly against Apify platform data sources, like Datasets. It's a developer tool for extracting and aggregating stored data without manual export and processing.
Key Features
- Run SQL on Datasets: Execute
SELECTqueries to filter, aggregate, and sort data from any Apify Dataset. - Simple Storage: Query results are automatically saved into the run's default Dataset.
- Proof-of-Concept Scope: Currently focuses on core query functionality over Datasets, with optimizations and extended features planned.
How to Use
Provide an SQL query as input. Reference a Dataset using its ID within backticks in the FROM clause.
Example Query:
SELECT country, city, COUNT(*) as amount
FROM `jepxmCkXTBGk5buxxx` -- Your Dataset ID
GROUP BY country, city
ORDER BY country ASC, city ASC
This query would count records per city and country from the specified Dataset.
Input / Output
Input:
The actor accepts a configuration object. The only required parameter is your SQL query string.
{
"query": "SELECT * FROM `your-dataset-id` LIMIT 10"
}
Output:
The results of your query are stored as individual records in the default Dataset of the actor run. You can access this Dataset via the Apify console or API to download the results in JSON, CSV, or other formats.
Current Status & Planned Work (TODO)
This is an active proof of concept. Planned improvements include:
* Load Optimizations: Loading only queried fields and parallel data fetching.
* Improved Type Detection: Better recognition of dates, integers, and numbers.
* System Tables: Query platform metadata (e.g., actor runs).
* Database Migration: Moving to PostgreSQL to support PL/pgSQL scripts.
Categories
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 SQL Query now on Apify. Free tier available with no credit card required.
Start Free TrialActor Information
- Developer
- useful-tools
- Pricing
- Paid
- Total Runs
- 755
- Active Users
- 15
Related Actors
Web Scraper
by apify
Cheerio Scraper
by apify
Website Content Crawler
by apify
Legacy PhantomJS Crawler
by apify
Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.
Learn more about ApifyNeed Professional Help?
Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.
Trusted by millions | Money-back guarantee | 24/7 Support