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=422&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 4572 results for "api"(602ms)

APITemplateWithSwaggerUIREADME.md1 match

@dcm31•Updated 2 months ago
1# APITemplateWithSwaggerUI

blueskyBotTutorialREADME.md1 match

@charmaine•Updated 2 months ago
1# Bluesky Bot Tutorial
2
3*_This template shows you how to use the Bluesky API to make a bot. This starter template was ported from [this one on Docs](https://docs.bsky.app/docs/starter-templates/bots)._*
4
5## To run it:

cerebrasTemplateREADME.md6 matches

@charmaine•Updated 2 months ago
22
231. Sign up for [Cerebras](https://cloud.cerebras.ai/)
242. Get a Cerebras API Key
253. Save it in a [Val Town environment variable](https://www.val.town/settings/environment-variables) called `CEREBRAS_API_KEY`
26
27Once Cerebras is set up in your Val Town account, there are two ways to get started:
37const { OpenAI } = await import("https://esm.sh/openai");
38const client = new OpenAI({
39 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
40 baseURL: "https://api.cerebras.ai/v1"
41});
42const response = await client.chat.completions.create({
54## Sample apps
55
56* **[Cerebras Searcher](https://www.val.town/v/stevekrouse/cerebras_searcher)** - a Perplexity clone that uses the SerpAPI to do RAG
57and summaries with Cerebras (*requires a SerpAPI key*)
58* **[Cerebras Coder](https://www.val.town/v/stevekrouse/cerebras_coder)** - an app that
59generates websites in a second with Cerebras

cerebrasTemplatemain.tsx5 matches

@charmaine•Updated 2 months ago
88 // Keep these comments so we remember not to change this
89 const client = new OpenAI({
90 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
91 baseURL: "https://api.cerebras.ai/v1",
92 });
93
101 return Response.json({ message: generatedMessage });
102 } catch (error) {
103 console.error("Error calling Cerebras API:", error);
104
105 if (error.status === 429) {
106 return Response.json({ error: "Cerebras API rate limit reached. Please try again later." }, { status: 429 });
107 } else {
108 return Response.json({ error: `API Error: ${error.message}` }, { status: 500 });
109 }
110 }

respectableCoralLimpetREADME.md5 matches

@charmaine•Updated 2 months ago
1# Gemini API
2A simple and easy to use client for the Gemini API
3
4*_This template shows you how to use the Gemini. This starter template was ported from [this one on Docs](https://ai.google.dev/gemini-api/docs/quickstart?lang=node#install-gemini-library)._*
5
6## To run it:
7
8- Click `Fork` on this val
9- Get your [Gemini API key](https://aistudio.google.com/app/apikey)
10- Add it to your [Environment Variables](https://www.val.town/settings/environment-variables) as `GEMINI_API_KEY`
11- Click `Run` on this script val

respectableCoralLimpetmain.tsx1 match

@charmaine•Updated 2 months ago
1import { GoogleGenerativeAI } from "npm:@google/generative-ai";
2
3const genAI = new GoogleGenerativeAI(Deno.env.get("GEMINI_API_KEY"));
4const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash" });
5

googleGeminiAPImain.tsx1 match

@charmaine•Updated 2 months ago
1import { GoogleGenerativeAI } from "npm:@google/generative-ai";
2
3const genAI = new GoogleGenerativeAI(Deno.env.get("GEMINI_API_KEY"));
4const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash" });
5

listNotionUsersREADME.md2 matches

@charmaine•Updated 2 months ago
1# Notion SDK for JavaScript
2A simple and easy to use client for the Notion API
3
4*_This template shows you how to use the Notion SDK. This starter template was ported from [this one on GitHub](https://github.com/makenotion/notion-sdk-js?tab=readme-ov-file#installation)._*
7
8- Click `Fork` on this val
9- Get your Notion API key at https://www.notion.so/profile/integrations
10- Add it to your [Environment Variables](https://www.val.town/settings/environment-variables) as `NOTION_TOKEN`
11- Click `Run` on this script val

BraintrustSDKtutorial1 match

@stevekrouse•Updated 2 months ago
5export default async function handler() {
6 const result = {
7 apiKeyStatus: null,
8 evalStarted: false,
9 evalComplete: false,

BraintrustSDKREADME.md2 matches

@stevekrouse•Updated 2 months ago
12
13- Click `Fork` on this val
14- Get your Braintrust API key at https://www.braintrust.dev/app/settings?subroute=api-keys
15- Add it to your project `Environment Variables` (on the left side bar of this project) as `BRAINTRUST_API_KEY`
16- Click `Run` on the `tutorial` val

PassphraseAPI2 file matches

@wolf•Updated 1 day ago

openapi2 file matches

@stevekrouse•Updated 4 days ago
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com
fiberplane
Purveyors of Hono tooling, API Playground enthusiasts, and creators of 🪿 HONC 🪿 (https://honc.dev)