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/image-url.jpg?q=api&page=16&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 11661 results for "api"(2331ms)

99
100 try {
101 const url = `https://api.github.com/repos/${repo}/issues/${prNumber}/assignees`;
102
103 const response = await fetch(url, {
132 }
133 } catch (error) {
134 console.error("Exception during API call:", error);
135 return { success: false, message: error.message };
136 }
GitHub-PR-Automation

GitHub-PR-AutomationREADME.md1 match

@charmaine•Updated 1 day ago
79
801. **Create a Slack App**:
81 - Go to [Slack API Apps](https://api.slack.com/apps) → Create New App → From scratch
82 - Name your app and select your workspace
83 - Click "Create App"

NowPlayingGrabbermain.tsx2 matches

@thunder75•Updated 1 day ago
2import querystring from "npm:querystring";
3
4const NOW_PLAYING_ENDPOINT = "https://api.spotify.com/v1/me/player/currently-playing";
5const TOKEN_ENDPOINT = "https://accounts.spotify.com/api/token";
6
7const client_id = Deno.env.get("spotify_client_id");

instagram-toolsfollows-check.jsx1 match

@julianpera•Updated 1 day ago
4export default async function handleCron(interval) {
5 const following = await fetchCookie(
6 "https://www.instagram.com/api/v1/friendships/375942300/following/?query=miguelse10",
7 {
8 method: "GET",

NowPlayingGrabbermain.tsx2 matches

@anthropium•Updated 1 day ago
2import querystring from "npm:querystring";
3
4const NOW_PLAYING_ENDPOINT = "https://api.spotify.com/v1/me/player/currently-playing";
5const TOKEN_ENDPOINT = "https://accounts.spotify.com/api/token";
6
7const client_id = Deno.env.get("client_id");

telegramBotStartersetupHook.tsx2 matches

@asdfg•Updated 1 day ago
11 try {
12 const botToken = process.env.TELEGRAM_BOT_TOKEN;
13 const response = await fetch(`https://api.telegram.org/bot${botToken}/setWebhook`, {
14 method: "POST",
15 headers: { "Content-Type": "application/json" },
37 const botToken = process.env.TELEGRAM_BOT_TOKEN;
38
39 const response = await fetch(`https://api.telegram.org/bot${botToken}/getWebhookInfo`);
40 const result = await response.json();
41 return result;

turbo-testmain.tsx3 matches

@msmh•Updated 1 day ago
286 "https://app.vellum.ai/_next/static/chunks/pages/_error-9bc36082609f2674.js.map",
287 "https://app.vellum.ai/_next/static/chunks/pages/accept-invite-190ccfc61094d02d.js.map",
288 "https://app.vellum.ai/_next/static/chunks/pages/api-keys-ad7c4818b157828f.js.map",
289 "https://app.vellum.ai/_next/static/chunks/pages/data-export-jobs/[dataExportJobId]-7472b2fc1a9a3f2c.js.map",
290 "https://app.vellum.ai/_next/static/chunks/pages/deployments-8934ba311790cc1f.js.map",
311 "https://app.vellum.ai/_next/static/chunks/pages/onboarding/workflows-sdk/examples-1fedd13a3310214f.js.map",
312 "https://app.vellum.ai/_next/static/chunks/pages/onboarding/workflows-sdk/install-vellum-sdk-23a63d76517c8d09.js.map",
313 "https://app.vellum.ai/_next/static/chunks/pages/onboarding/workflows-sdk/setup-provider-api-access-9cabba2913661d20.js.map",
314 "https://app.vellum.ai/_next/static/chunks/2828-3afe94e83eb754c9.js.map",
315 "https://app.vellum.ai/_next/static/chunks/pages/onboarding/workflows-sdk/setup-vellum-api-key-cdf0ac3a278a322f.js.map",
316 "https://app.vellum.ai/_next/static/chunks/pages/onboarding/workflows-sdk/test-installation-c0f7ad02f765085e.js.map",
317 "https://app.vellum.ai/_next/static/chunks/pages/organization-85e6b4c0e6a639e2.js.map",

cerebras_coderstarter-prompts.js1 match

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

cerebras_coderREADME.md2 matches

@Webmaker•Updated 1 day ago
8
91. Sign up for [Cerebras](https://cloud.cerebras.ai/)
102. Get a Cerebras API Key
113. Save it in your project env variable called `CEREBRAS_API_KEY`

cerebras_coderindex.ts1 match

@Webmaker•Updated 1 day ago
211 } catch (error) {
212 Toastify({
213 text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
214 position: "center",
215 duration: 3000,

new-val-api-21 file match

@shouser•Updated 20 hours ago
This is an example of using the API to create a val.

gptApiTemplate2 file matches

@charmaine•Updated 2 days ago
mux
Your friendly, neighborhood video API.
api