> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tinyfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Find Only Recent Results

> Get results published within the last few minutes, hours, or days using recency_minutes

> [!NOTE]
>
> **Capability:**`recency_minutes`

Use this when you want results from a window relative to now, such as breaking news from the last hour. For a fixed calendar range, see [Search within a date window](https://docs.tinyfish.ai/tinysearch/how-to/date-window.md).

![Search Playground with the Last 7 days date preset applied, searching for FIFA and returning recent results](https://mintcdn.com/tinyfish/ADytV_7b8TFoYDf0/images/tinysearch-howto/recent-results.gif?s=3f1196853e249177655d72402f0c7731)

In the Playground, a rolling preset such as **Last 7 days** sets `recency_minutes` for you.

```python Python theme={null}
from tinyfish import TinyFish

client = TinyFish()
response = client.search.query(query="FIFA", recency_minutes=60)

for r in response.results:
    print(f"{r.position}. {r.title}")
```

```typescript TypeScript theme={null}
import { TinyFish } from "@tiny-fish/sdk";

const client = new TinyFish();
const response = await client.search.query({
  query: "FIFA",
  recency_minutes: 60,
});

for (const r of response.results) {
  console.log(`${r.position}. ${r.title}`);
}
```

```bash cURL theme={null}
curl -G "https://api.search.tinyfish.ai" \
  --data-urlencode "query=FIFA" \
  --data-urlencode "recency_minutes=60" \
  -H "X-API-Key: $TINYFISH_API_KEY"
```

`recency_minutes` takes an integer from `1` to `5256000` (10 years). `60` means the last hour and `1440` the last day.

## Common Mistakes

> [accordion] Combining it with `after_date` or `before_date`
>
> The two kinds of filter cannot be used together, and the request is rejected. Pick one.

> [accordion] Using it with `domain_type=research_paper`
>
> Research papers do not support `recency_minutes`. Use `pub_year_min` and `pub_year_max` instead.

## Related

> [card] [Search Within a Date Window](https://docs.tinyfish.ai/tinysearch/how-to/date-window.md)
>
> Get results from a fixed calendar range

> [card] [TinySearch API Reference](https://docs.tinyfish.ai/tinysearch/reference)
>
> Every parameter, accepted value, and error code


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.