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=805&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"(1763ms)

convertToResumeJSONmain.tsx3 matches

@iamseeley•Updated 10 months ago
3const tokenBucket = new TokenBucket(5, 1/12);
4
5export async function convertToResumeJSON(resume, apiKey) {
6 if (!tokenBucket.consume()) {
7 throw new Error("Rate limit reached. Please try again later.");
8 }
9
10 const endpoint = 'https://api.openai.com/v1/chat/completions';
11 const model = 'gpt-4';
12
138 method: 'POST',
139 headers: {
140 'Authorization': `Bearer ${apiKey}`,
141 'Content-Type': 'application/json',
142 },

browserbaseUtilsmain.tsx2 matches

@charlypoly•Updated 10 months ago
7export async function loadPageContent(url: string, options: LoadPageOptions = { textContent: false }) {
8 const browser = await puppeteer.connect({
9 browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${Deno.env.get("BROWSERBASE_API_KEY")}`,
10 });
11
37export async function screenshotPage(url: string, options: ScreenshotOptions = { fullPage: true }) {
38 const browser = await puppeteer.connect({
39 browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${Deno.env.get("BROWSERBASE_API_KEY")}`,
40 });
41

valTownChatGPTmain.tsx1 match

@xuybin•Updated 10 months ago
3import { renderToString } from "npm:react-dom/server";
4
5// This uses by personal API key, you'll need to provide your own if
6// you fork this. We'll be adding support to the std/openai lib soon!
7const openai = new OpenAI();

openAIStreamingREADME.md3 matches

@xuybin•Updated 10 months ago
10assistant > Here are a few fun Val ideas you could build on Val Town:
11
121. **Random Joke Generator:** Fetch a random joke from an API and display it.
132. **Daily Weather Update:** Pull weather data for your location using an API and create a daily summary.
143. **Mini Todo List:** Create a simple to-do list app with add, edit, and delete functionalities.
154. **Chuck Norris Facts:** Display a random Chuck Norris fact sourced from an API.
165. **Motivational Quote of the Day:** Fetch and display a random motivational quote each day.
17

vscodemain.tsx1 match

@xuybin•Updated 10 months ago
72 "https://openvsxorg.blob.core.windows.net/resources/{publisher}/{name}/{version}/{path}",
73 },
74 "extensionEnabledApiProposals": {
75 "vscode.vscode-web-playground": [
76 "fileSearchProvider",

feedsmain.tsx1 match

@nws•Updated 10 months ago
50 // gets all posts under #StateWX and returns them
51 const res = await fetch(
52 `https://public.api.bsky.app/xrpc/app.bsky.feed.searchPosts?q=%23${state}&limit=50&sort=latest`,
53 ).then((res) => res.json());
54 let posts = [];

amaranthPlanarianREADME.md1 match

@ikbear•Updated 10 months ago
13Change the `query` variable for what you want to get notified for.
14
15You can use [Twitter's search operators](https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators) to customize your query, for some collection of keywords, filtering out others, and much more!
16
17## 3. Notification

twitterAlertREADME.md1 match

@ikbear•Updated 10 months ago
25Todos:
26
27- this should filter the twitter API call to only tweets since the last run.
28- some kind of caching to avoid rate limiting
29- would be nice to use the user's feed instead of a username list... but not sure how easy that is

aqiREADME.md1 match

@chen•Updated 10 months ago
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12

upload_jsonmain.tsx1 match

@stevedylandev•Updated 10 months ago
13 },
14 });
15 const res = await fetch("https://api.pinata.cloud/pinning/pinJSONToIPFS", {
16 method: "POST",
17 headers: {

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