NAME
Net::Async::WebSearch::Provider::Reddit - Reddit search provider (keyless JSON endpoint)
VERSION
version 0.002
SYNOPSIS
my $r = Net::Async::WebSearch::Provider::Reddit->new;
# or subreddit-scoped by default:
my $r = Net::Async::WebSearch::Provider::Reddit->new(
subreddit => 'perl',
sort => 'top',
time => 'year',
);
DESCRIPTION
Keyless provider backed by Reddit's public JSON search endpoint (/search.json, or /r/SUB/search.json when a subreddit is scoped). Reddit requires a distinct User-Agent string; requests made with generic UAs are rate-limited aggressively.
The returned url is the post's target link (external URL on link posts, permalink on self/text posts). The permalink is always available under $result->extra->{permalink}.
endpoint
Base URL. Default https://www.reddit.com. Switch to https://old.reddit.com or a private mirror (Teddit, Libreddit, etc.) if desired.
subreddit
Default subreddit scope. Per-call subreddit in %opts overrides. Leave undef for site-wide search.
sort
Default ordering: relevance (default), hot, top, new, comments.
time
Default time window: all (default), hour, day, week, month, year.
link_base
Base URL used to build absolute permalinks out of Reddit's relative paths. Default https://www.reddit.com.
search
Honours limit, plus Reddit-specific subreddit, sort, time, include_nsfw.
SEE ALSO
https://www.reddit.com/dev/api/, Net::Async::WebSearch
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-net-async-websearch/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.de> https://raudss.us/
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.