You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$1?q=api&page=66&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 18502 results for "api"(2485ms)
7async function sendTelegramMessage(message: string) {
8for (const chat_id of TELEGRAM_CHAT_IDS) {
9const url = `https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage`;
10console.log(`Sending Telegram message to ${chat_id}...`);
11const res = await fetch(url, {
222. Note your Val's URL (you'll need this for the Neynar webhook setup)
2324### Step 2: Create Twitter Developer Account & API Keys
25261. Go to [Twitter Developer Portal](https://developer.x.com/en/portal/dashboard)
364. Save the settings
3738#### Generate API Keys
39After setting up authentication with read/write permissions:
40411. Go to "Keys and Tokens" tab
422. Generate/copy these credentials:
43- **API Key** (`TWITTER_API_KEY`)
44- **API Secret** (`TWITTER_API_SECRET`)
45- **Access Token** (`TWITTER_ACCESS_TOKEN`)
46- **Access Token Secret** (`TWITTER_ACCESS_TOKEN_SECRET`)
5152In your Val Town script, add these environment variables:
53- `TWITTER_API_KEY`
54- `TWITTER_API_SECRET`
55- `TWITTER_ACCESS_TOKEN`
56- `TWITTER_ACCESS_TOKEN_SECRET`
70Check the Val Town logs if posts aren't appearing on Twitter:
71- Verify all environment variables are set
72- Ensure Twitter API keys have read/write permissions
73- Check that webhook URL is correctly configured in Neynar
74- Verify your Neynar webhook is active and properly filtered