Skip to content

Commit 4ef1f1d

Browse files
authored
Merge pull request #15 from ScrapeGraphAI/update-mcp
feat: add time_range parameter to searchscraper
2 parents f662e79 + 81f2773 commit 4ef1f1d

File tree

4 files changed

+327
-23
lines changed

4 files changed

+327
-23
lines changed

.agent/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Quick reference to all MCP tools:
178178
|------|------------|---------|---------|-------|
179179
| `markdownify` | `website_url` | Convert webpage to markdown | 2 | No |
180180
| `smartscraper` | `user_prompt`, `website_url`, `number_of_scrolls?`, `markdown_only?` | AI-powered data extraction | 10+ | No |
181-
| `searchscraper` | `user_prompt`, `num_results?`, `number_of_scrolls?` | AI-powered web search | Variable | No |
181+
| `searchscraper` | `user_prompt`, `num_results?`, `number_of_scrolls?`, `time_range?` | AI-powered web search | Variable | No |
182182
| `smartcrawler_initiate` | `url`, `prompt?`, `extraction_mode`, `depth?`, `max_pages?`, `same_domain_only?` | Start multi-page crawl | 100+ | Yes (returns request_id) |
183183
| `smartcrawler_fetch_results` | `request_id` | Get crawl results | N/A | No (polls status) |
184184

@@ -376,6 +376,11 @@ npx @modelcontextprotocol/inspector scrapegraph-mcp
376376

377377
## 📅 Changelog
378378

379+
### January 2026
380+
- ✅ Added `time_range` parameter to SearchScraper for filtering results by recency
381+
- ✅ Supported time ranges: `past_hour`, `past_24_hours`, `past_week`, `past_month`, `past_year`
382+
- ✅ Documentation updated to reflect SDK changes (scrapegraph-py#77, scrapegraph-js#2)
383+
379384
### October 2025
380385
- ✅ Initial comprehensive documentation created
381386
- ✅ Project architecture fully documented

.agent/system/project_architecture.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ScrapeGraph MCP Server - Project Architecture
22

3-
**Last Updated:** October 2025
3+
**Last Updated:** January 2026
44
**Version:** 1.0.0
55

66
## Table of Contents
@@ -255,14 +255,15 @@ The server exposes 5 tools to AI assistants:
255255

256256
---
257257

258-
### 3. `searchscraper(user_prompt: str, num_results: int = None, number_of_scrolls: int = None)`
258+
### 3. `searchscraper(user_prompt: str, num_results: int = None, number_of_scrolls: int = None, time_range: str = None)`
259259

260260
**Purpose:** Perform AI-powered web searches with structured results
261261

262262
**Parameters:**
263263
- `user_prompt` (str) - Search query or instructions
264264
- `num_results` (int, optional) - Number of websites to search (default: 3 = 30 credits)
265265
- `number_of_scrolls` (int, optional) - Number of infinite scrolls per website
266+
- `time_range` (str, optional) - Filter results by recency. Valid values: `past_hour`, `past_24_hours`, `past_week`, `past_month`, `past_year`
266267

267268
**Returns:**
268269
```json
@@ -282,7 +283,8 @@ The server exposes 5 tools to AI assistants:
282283
"Research the latest AI developments in 2025"
283284
→ AI calls: searchscraper(
284285
user_prompt="Latest AI developments in 2025",
285-
num_results=5
286+
num_results=5,
287+
time_range="past_week"
286288
)
287289
```
288290

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,13 @@ Execute AI-powered web searches with structured, actionable results.
9696
searchscraper(
9797
user_prompt: str,
9898
num_results: int = None,
99-
number_of_scrolls: int = None
99+
number_of_scrolls: int = None,
100+
time_range: str = None # Filter by: past_hour, past_24_hours, past_week, past_month, past_year
100101
)
101102
```
102103
- **Credits**: Variable (3-20 websites × 10 credits)
103104
- **Use case**: Multi-source research and data aggregation
105+
- **Time filtering**: Use `time_range` to filter results by recency (e.g., `"past_week"` for recent results)
104106

105107
### Advanced Scraping Tools
106108

@@ -518,6 +520,7 @@ The server enables sophisticated queries across various scraping scenarios:
518520
- **SearchScraper**: "Research and summarize recent developments in AI-powered web scraping"
519521
- **SearchScraper**: "Search for the top 5 articles about machine learning frameworks and extract key insights"
520522
- **SearchScraper**: "Find recent news about GPT-4 and provide a structured summary"
523+
- **SearchScraper with time_range**: "Search for AI news from the past week only" (uses `time_range="past_week"`)
521524

522525
### Website Analysis
523526
- **Sitemap**: "Extract the complete sitemap structure from the ScrapeGraph website"

0 commit comments

Comments
 (0)