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=521&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 9424 results for "api"(2801ms)

grandCoffeeSquirrelREADME.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.

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.

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 });

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.

templateRedditAlertmain.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 = ["taylor swift"];
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 });

templateRedditAlertREADME.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.

twitterAlertREADME.md4 matches

@charmainetest•Updated 3 months ago
31Refer to [Twitter's search operators](https://socialdata.gitbook.io/docs/twitter-tweets/retrieve-search-results-by-keyword#endpoint-parameters) to fine-tune your query.
32
33### 4. Test API call
34Set `isProd = false` in the code if you are testing, to ensure there are enough tweets to display. <br>
35Toggle it back to `true` when you're ready to run this cron job in production and actuall send notifications.
60
61### NOTE: Usage Limits
62This val uses the SocialData API for Twitter data:
63
64- **Proxies via Val Town's [SocialDataProxy](https://www.val.town/v/stevekrouse/socialDataProxy)**: Limited to 10 cents per day for [**Val Town Pro users**](https://www.val.town/pricing). This API is *only* for Pro users.
65- **Need more calls?** Sign up for your own [SocialData API token](https://socialdata.tools) and configure the [`socialDataSearch`](https://www.val.town/v/stevekrouse/socialDataSearch) function.

daily-advice-app1 file match

@dcm31•Updated 1 day ago
Random advice app using Advice Slip API

gptApiTemplate1 file match

@charmaine•Updated 2 days ago
papimark21
substrate
Substrate is the modular API for fast multi-step AI programs