You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/image-url.jpg%20%22Image%20title%22?q=api&page=69&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=api
Returns an array of strings in format "username" or "username/projectName"
Found 19740 results for "api"(2698ms)
5## ๐ Features
67- **Real-time Monitoring**: Uses Reddit's official API for reliable access
8- **Keyword Detection**: Monitors posts for configurable keywords
9- **Email Notifications**: Sends detailed email alerts when matches are found
1516```
17โโโ reddit-api-monitor.ts # Main monitoring script (cron job) โ READY
18โโโ test-reddit-api.ts # API testing and setup tool (HTTP) โ READY
19โโโ test-main-monitor.ts # Manual testing for main monitor (HTTP) โ READY
20โโโ test-slack.ts # Slack webhook testing tool (HTTP) โ READY
38- **Post Limit**: 25 posts per check
3940### Reddit API Credentials โ CONFIGURED
4142- **Client ID**: `151sZ8h5TaHVZGZZn0rOhA`
47### Automatic Monitoring โ READY
4849The main monitor (`reddit-api-monitor.ts`) runs automatically as a cron job. To configure the schedule:
50511. Go to the Val Town web UI
522. Find the `reddit-api-monitor.ts` file
533. Edit the cron schedule as needed (recommended: every 15-30 minutes)
5455### Manual Testing โ WORKING
5657#### Test Reddit API Connection
58```
59GET /test-reddit-api.ts?action=help
60```
6162#### Test Authentication โ VERIFIED
63```
64GET /test-reddit-api.ts?action=auth&client_id=151sZ8h5TaHVZGZZn0rOhA
65```
6667#### Test Full Functionality โ VERIFIED (Found 1 match in recent test)
68```
69GET /test-reddit-api.ts?action=test&client_id=151sZ8h5TaHVZGZZn0rOhA&subreddit=lovable
70```
7185#### Reset Stored Data
86```
87GET /test-reddit-api.ts?action=reset
88```
89126### Adding New Keywords
127128Edit the `CONFIG` object in `reddit-api-monitor.ts`:
129130```typescript
158## ๐ Security
159160- Reddit API credentials are configured and working
161- Access tokens are cached and automatically refreshed
162- All API calls use proper authentication headers
163164## โ System Status
166### Current Status: FULLY OPERATIONAL WITH SLACK INTEGRATION
167168- โ Reddit API authentication working
169- โ Post fetching functional
170- โ Keyword matching operational
197### Debug Tools โ ALL WORKING
198199- Use `test-reddit-api.ts` to verify API connectivity
200- Use `test-main-monitor.ts` to run the monitor manually
201- Check Val Town logs for detailed error information
203## ๐ Recent Test Results
204205- **API Connection**: โ Successful
206- **Authentication**: โ Working
207- **Post Fetching**: โ Retrieved 10 posts from r/lovable
215## ๐ Backup Options
216217The project includes an RSS-based monitor (`reddit-rss-monitor.ts`) as a backup option if the API approach encounters issues. The RSS monitor has similar functionality but uses Reddit's RSS feeds instead of the official API.
149color: "danger",
150title: "Monitor Failed",
151text: `Reddit API monitor encountered an error: Test error message for webhook testing`,
152footer: "Reddit Monitor",
153ts: Math.floor(Date.now() / 1000)