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=443&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 4574 results for "api"(522ms)

btoamain.tsx1 match

@stevekrouse•Updated 1 year ago
1// https://developer.mozilla.org/en-US/docs/Web/API/btoa
2import { Buffer } from "node:buffer";
3

githubUsermain.tsx1 match

@stevekrouse•Updated 1 year ago
3// Github profile
4export let githubUser = fetchJSON(
5 "https://api.github.com/users/stevekrouse"
6);

eval_main.tsx1 match

@stevekrouse•Updated 1 year ago
2
3export let eval_ = (code, args?) =>
4 fetchJSON("https://api.val.town/v1/eval", {
5 method: "POST",
6 body: JSON.stringify({

rimeAPIExmain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { runVal } from "https://esm.town/v/std/runVal";
2
3export const rimeAPIEx = await runVal("stevekrouse.rime", {
4 text: "hello friend",
5 speaker: "young_female_latina-4",

discordMessagesmain.tsx1 match

@stevekrouse•Updated 1 year ago
3export function discordMessages({ botToken, channelId }) {
4 return fetchJSON(
5 `https://discord.com/api/channels/${channelId}/messages`,
6 {
7 headers: {

hnSearchByDatemain.tsx1 match

@stevekrouse•Updated 1 year ago
2
3export let hnSearchByDate = (params) => fetchJSON(
4 `http://hn.algolia.com/api/v1/search_by_date?${new URLSearchParams(params)}`
5)

arenaApiExamplemain.tsx2 matches

@tmcw•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let arenaApiExample = (async () => {
4 const resp = await fetch(
5 "http://api.are.na/v2/channels/that-glassy-dark-design-style",
6 );
7 const json = await resp.json();

runGETmain.tsx1 match

@stevekrouse•Updated 1 year ago
2
3export let runGET = fetchJSON(
4 `https://api.val.town/v1/run/stevekrouse.add?args=${JSON.stringify([1, 2])}`,
5);

axiosExmain.tsx1 match

@stevekrouse•Updated 1 year ago
1export const axiosEx = (async () => {
2 const { default: axios } = await import("https://esm.sh/axios");
3 let r = await axios.get("https://api.github.com/users/stevekrouse/following");
4 return JSON.stringify(r);
5})();

valTownApiExampleValmain.tsx2 matches

@tmcw•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let valTownApiExampleVal = (async () => {
4 const response = await fetch(
5 `https://api.val.town/v1/alias/tmcw/valTownApiExampleVal`,
6 );
7 return await response.json();

PassphraseAPI2 file matches

@wolf•Updated 2 days 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)