Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/?q=api&page=551&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 10974 results for "api"(1428ms)

tangibleBlackTigermain.tsx7 matches

@charmainetest•Updated 3 months ago
1import { SearchResult, searchWithSerpApi } from "https://esm.town/v/charmaine/searchWithSerpApi";
2import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook";
3
5const KEYWORDS = ["node"];
6const EXCLUDES = "";
7const DISCORD_API_KEY = Deno.env.get("mentionsDiscord");
8const SERP_API_KEY = Deno.env.get("SERP_API_KEY");
9
10export default async function redditTestAlert({ lastRunAt }: Interval) {
19 );
20
21 // Perform searches using SERP API on reddit.com
22 const results = await Promise.all(
23 searchQueries.map((query) =>
24 searchWithSerpApi({
25 query,
26 site: "reddit.com",
27 apiKey: SERP_API_KEY,
28 })
29 ),
49 try {
50 await discordWebhook({
51 url: DISCORD_API_KEY, // Make sure this is set in your environment variables
52 content: `${message}`,
53 });

tangibleBlackTigerREADME.md10 matches

@charmainetest•Updated 3 months ago
72. Send notifications to your preferred platform (Discord, Slack, email, etc.)
8
9Reddit does not have an API that allows users to scrape data, so we are doing this with the Google Search API, [Serp](https://serpapi.com/).
10
11---
29
30---
31### 3. Get a SerpApi Key
32This template requires a [SerpApi](https://serpapi.com/) key to search Reddit posts via Google search results.
33
341. **Get a SerpApi key**:
35 - Sign up at [SerpApi](https://serpapi.com/) to create an account.
36 - Generate an API key from your account dashboard.
37
382. **Add the SerpApi key to your environment variables**:
39 - Go to your [Val Town environment variables](https://www.val.town/settings/environment-variables).
40 - Add a new key:
41 - Key: `SERP_API_KEY`
42 - Value: Your SERP API key.
43
44Without this key, the val will not function correctly.
75
76### NOTE: Usage Limits
77- **SerpApi:** Free SerpApi accounts have monthly call limits.

honestMagentaCranemain.tsx7 matches

@charmaine•Updated 3 months ago
1import { SearchResult, searchWithSerpApi } from "https://esm.town/v/charmaine/searchWithSerpApi";
2import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook";
3
5const KEYWORDS = ["node"];
6const EXCLUDES = "";
7const DISCORD_API_KEY = Deno.env.get("mentionsDiscord");
8const SERP_API_KEY = Deno.env.get("SERP_API_KEY");
9
10export default async function redditAlert({ lastRunAt }: Interval) {
19 );
20
21 // Perform searches using SERP API on reddit.com
22 const results = await Promise.all(
23 searchQueries.map((query) =>
24 searchWithSerpApi({
25 query,
26 site: "reddit.com",
27 apiKey: SERP_API_KEY,
28 })
29 ),
49 try {
50 await discordWebhook({
51 url: DISCORD_API_KEY, // Make sure this is set in your environment variables
52 content: `${message}`,
53 });

honestMagentaCraneREADME.md10 matches

@charmaine•Updated 3 months ago
72. Send notifications to your preferred platform (Discord, Slack, email, etc.)
8
9Reddit does not have an API that allows users to scrape data, so we are doing this with the Google Search API, [Serp](https://serpapi.com/).
10
11---
29
30---
31### 3. Get a SerpApi Key
32This template requires a [SerpApi](https://serpapi.com/) key to search Reddit posts via Google search results.
33
341. **Get a SerpApi key**:
35 - Sign up at [SerpApi](https://serpapi.com/) to create an account.
36 - Generate an API key from your account dashboard.
37
382. **Add the SerpApi key to your environment variables**:
39 - Go to your [Val Town environment variables](https://www.val.town/settings/environment-variables).
40 - Add a new key:
41 - Key: `SERP_API_KEY`
42 - Value: Your SERP API key.
43
44Without this key, the val will not function correctly.
75
76### NOTE: Usage Limits
77- **SerpApi:** Free SerpApi accounts have monthly call limits.

blueskyAlertmain.tsx3 matches

@ianvph•Updated 3 months ago
1import { AtpAgent } from "npm:@atproto/api@0.13.15";
2import pMap from "npm:p-map";
3
5
6const agent = new AtpAgent({
7 service: "https://public.api.bsky.app/",
8 // fetch, ideally we'd use our @std/fetch proxy here but that doesn't work and I don't know why
9});
37
38 if (!response.ok) {
39 throw new Error(`Slack API error: ${response.status} ${response.statusText}`);
40 }
41

watchfulAquamarineWildebeestmain.tsx1 match

@vishu44•Updated 3 months ago
12 },
13 {
14 prompt: "weather dashboard for nyc using open-meteo API for NYC with icons",
15 title: "Weather App",
16 code:

scholarlyIvoryMosquitomain.tsx7 matches

@charmainetest•Updated 3 months ago
1import { SearchResult, searchWithSerpApi } from "https://esm.town/v/charmaine/searchWithSerpApi";
2import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook";
3
6const DAYS_BACK = 1;
7const EXCLUDES = "";
8const DISCORD_API_KEY = Deno.env.get("mentionsDiscord");
9const SERP_API_KEY = Deno.env.get("SERP_API_KEY");
10
11export default async function redditAlert() {
13 const searchQueries = KEYWORDS.map((k) => `"${k}" ${EXCLUDES}`);
14
15 // Perform searches using SERP API on reddit.com
16 const results = await Promise.all(
17 searchQueries.map((query) =>
18 searchWithSerpApi({
19 query,
20 site: "reddit.com",
21 daysBack: DAYS_BACK,
22 apiKey: SERP_API_KEY,
23 })
24 ),
44 try {
45 await discordWebhook({
46 url: DISCORD_API_KEY, // Make sure this is set in your environment variables
47 content: `${message}`,
48 });

loyalMoccasinLeopardmain.tsx1 match

@vishu44•Updated 3 months ago
12 },
13 {
14 prompt: "weather dashboard for nyc using open-meteo API for NYC with icons",
15 title: "Weather App",
16 code:

robustCoffeeQuokkamain.tsx1 match

@vishu44•Updated 3 months ago
12 },
13 {
14 prompt: "weather dashboard for nyc using open-meteo API for NYC with icons",
15 title: "Weather App",
16 code:

scholarlyIvoryMosquitoREADME.md10 matches

@charmainetest•Updated 3 months ago
72. Send notifications to your preferred platform (Discord, Slack, email, etc.)
8
9Reddit does not have an API that allows users to scrape data, so we are doing this with the Google Search API, [Serp](https://serpapi.com/).
10
11---
29
30---
31### 3. Get a SerpApi Key
32This template requires a [SerpApi](https://serpapi.com/) key to search Reddit posts via Google search results.
33
341. **Get a SerpApi key**:
35 - Sign up at [SerpApi](https://serpapi.com/) to create an account.
36 - Generate an API key from your account dashboard.
37
382. **Add the SerpApi key to your environment variables**:
39 - Go to your [Val Town environment variables](https://www.val.town/settings/environment-variables).
40 - Add a new key:
41 - Key: `SERP_API_KEY`
42 - Value: Your SERP API key.
43
44Without this key, the val will not function correctly.
75
76### NOTE: Usage Limits
77- **SerpApi:** Free SerpApi accounts have monthly call limits.

daily-advice-app1 file match

@dcm31•Updated 2 days ago
Random advice app using Advice Slip API

gptApiTemplate1 file match

@charmaine•Updated 3 days ago
apiv1
papimark21