Filter search results by publication date to find recent breakthroughs or analyse historical trends.
Parameters
Both are optional and work independently or together. Dates use ISO 8601 format: YYYY-MM-DD.
| Parameter | Effect | Example |
|---|
start_date | Include content published on or after this date | "2024-01-01" |
end_date | Include content published on or before this date | "2024-12-31" |
Dates must match YYYY-MM-DD exactly. "3/15/2024", "March 15, 2024", and "15-03-2024" are all invalid.
Examples
from valyu import Valyu
valyu = Valyu()
# Recent content - June 2024 onwards
valyu.search("quantum computing breakthroughs", start_date="2024-06-01")
# Date range - all of 2023
valyu.search(
"artificial intelligence ethics",
start_date="2023-01-01",
end_date="2023-12-31",
)
# Historical - pre-deep-learning era
valyu.search("machine learning foundations", end_date="2015-12-31")
import { Valyu } from "valyu-js";
const valyu = new Valyu();
// Recent content - June 2024 onwards
await valyu.search("quantum computing breakthroughs", { startDate: "2024-06-01" });
// Date range - all of 2023
await valyu.search("artificial intelligence ethics", {
startDate: "2023-01-01",
endDate: "2023-12-31",
});
// Historical - pre-deep-learning era
await valyu.search("machine learning foundations", { endDate: "2015-12-31" });
curl -X POST https://api.valyu.ai/v1/search \
-H "x-api-key: your-valyu-api-key" \
-H "Content-Type: application/json" \
-d '{
"query": "artificial intelligence ethics",
"start_date": "2023-01-01",
"end_date": "2023-12-31"
}'
Recommended ranges
More specific date ranges typically improve response times and relevance.
| Content type | Recommended range | Why |
|---|
| Academic papers | 6-12 months | Longer publication cycles |
| News | Days to weeks | Fast-moving information |
| Technical docs | 1-3 months | Regular updates |
| Financial reports | Quarters or years | Reporting cycles |
Source filtering
Filter by domain and dataset
Search quickstart
All search parameters