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=952&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 12013 results for "api"(926ms)

createAPIREADME.md1 match

@websandboxUpdated 1 year ago
1Migrated from folder: real/createAPI

blogSqliteUniverseREADME.md4 matches

@postpostscriptUpdated 1 year ago
6### Val Town-Hosted SQLite
7
8[Val Town](https://val.town/) hosts SQLite as part of its standard library ([@std/sqlite](https://val.town/v/std/sqlite)). This makes a fetch request against their closed-source API (using your API token) which returns results in a consistent format. This is great because you can host your own endpoints that work similarly, and _reuse code that was only designed in mind for that original hosted interface_
9
10The standard format (abridged to important fields):
161import { sqliteUniverseWithOptions, patterns, defaultPatterns } from "https://esm.town/v/postpostscript/sqliteUniverse";
162import { createSqlite } from "https://esm.town/v/postpostscript/sqliteWasm";
163import { sqliteFromAPI } from "https://esm.town/v/postpostscript/sqliteFromAPI";
164import { Statement } from "https://esm.town/v/postpostscript/sqliteBuilder";
165
185 /^~\/(\w+)/,
186 ({ endpoint, tables, match }) => {
187 return sqliteFromAPI(`@postpostscript/${match[1]}`)
188 },
189 ]
192 fallback({ endpoint, tables }) {
193 // if an endpoint is not found, this will be called
194 return sqliteFromAPI(`@postpostscript/sqlitePublic`)
195 },
196 },

aqiREADME.md1 match

@ProgStudioUpdated 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

cdnREADME.md1 match

@pomdtrUpdated 1 year ago
23### Fetching private val
24
25Pass an api token as an username
26
27```console

readmemain.tsx2 matches

@pomdtrUpdated 1 year ago
1import { api } from "https://esm.town/v/pomdtr/api";
2import { gfm } from "https://esm.town/v/pomdtr/gfm";
3
16
17export async function readme(author: string, name: string) {
18 const { readme } = await api(`/v1/alias/${author}/${name}`);
19 return readme;
20}

sqliteExplorerAppmain.tsx2 matches

@postpostscriptUpdated 1 year ago
53 <head>
54 <title>SQLite Explorer</title>
55 <link rel="preconnect" href="https://fonts.googleapis.com" />
56 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
57 <link
58 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"
59 rel="stylesheet"
60 />

weatherGPTREADME.md1 match

@liaolileUpdated 1 year ago
1If you fork this, you'll need to set `OPENAI_API_KEY` in your [Val Town Secrets](https://www.val.town/settings/secrets).
2
3

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 />

social_data_api_project3 file matches

@tsuchi_yaUpdated 7 hours ago

simple-scrabble-api1 file match

@bryUpdated 3 days 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