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/$%7Bart_info.art.src%7D?q=api&page=967&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 12157 results for "api"(3476ms)

bookmarkletsmain.tsx4 matches

@vladimyrUpdated 1 year ago
1/** @jsxImportSource https://esm.sh/hono@3.9.2/jsx **/
2import { api } from "https://esm.town/v/pomdtr/api";
3import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
4import { Hono } from "npm:hono";
9
10async function bookmarkletUrl(author: string, name: string) {
11 const { code } = await api(`/v1/alias/${author}/${name}`);
12 const { code: minifedCode } = await minify(`(${code})();`);
13 return `javascript:${encodeURIComponent(minifedCode)}`;
36const root = extractValInfo(import.meta.url);
37app.get("/", async c => {
38 const { data: vals } = await api(`/v1/search/vals?query=${encodeURIComponent("#bookmarklet")}`);
39
40 const bookmarklets = await Promise.all(
86app.get("/v/:author/:name", async c => {
87 const { author, name } = c.req.param();
88 const { privacy } = await api(`/v1/alias/${author}/${name}`);
89 if (privacy === "private") {
90 return c.notFound();

dubShortenURLmain.tsx1 match

@vladimyrUpdated 1 year ago
7 publicStats: false,
8 };
9 const { shortLink } = await ky.post("https://dub.co/api/links", { json }).json<any>();
10 return new URL(shortLink);
11}

sqliteExplorerAppmain.tsx2 matches

@ppsUpdated 1 year ago
50 <head>
51 <title>SQLite Explorer</title>
52 <link rel="preconnect" href="https://fonts.googleapis.com" />
53 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
54 <link
55 href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
56 rel="stylesheet"
57 />

blob_adminREADME.md1 match

@parkerdavisUpdated 1 year ago
9[![](https://img.shields.io/badge/Install-blue)](https://val.town/new?code=export%20%7B%20default%20as%20blob_admin%20%7D%20from%20%22https%3A%2F%2Fesm.town%2Fv%2Fstevekrouse%2Fblob_admin%22)
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
12
13# TODO

brownCoralREADME.md1 match

@tarngerineUpdated 1 year 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

BalanceBrightDatamain.tsx1 match

@augustohpUpdated 1 year ago
6 try {
7 const result = await fetchJSON(
8 "https://api.brightdata.com/customer/balance",
9 {
10 method: "GET",

gpt4Examplemain.tsx1 match

@kyutarouUpdated 1 year ago
1import { OpenAI } from "npm:openai";
2Deno.env.get("OPENAI_API_KEY");
3
4const openai = new OpenAI();

gpt4ExampleREADME.md1 match

@kyutarouUpdated 1 year ago
3This uses the brand new `gpt-4-1106-preview`.
4
5To use this, set `OPENAI_API_KEY` in your [Val Town Secrets](https://www.val.town/settings/secrets).

magentaDogmain.tsx1 match

@NegashUpdated 1 year ago
8}
9
10// API Endpoint to increment the number
11// Example endpoint: /increment
12app.post('/increment', (req, res) => {

queryParamsREADME.md1 match

@trclUpdated 1 year ago
1# Handling query params in requests
2
3Using the standard [URL#searchParams](https://developer.mozilla.org/en-US/docs/Web/API/URL/searchParams) method, you can grab query parameters out of any val that is operating using the [Web API](https://docs.val.town/api/web).
4
5This val demonstrates how to grab one or more query parameters. It returns the all the query parameters found as a json response.

groq-vapi-demo1 file match

@yawnxyzUpdated 5 hours ago

social_data_api_project3 file matches

@tsuchi_yaUpdated 1 day ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration