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/image-url.jpg%20%22Image%20title%22?q=api&page=1049&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 11861 results for "api"(1074ms)

myApimain.tsx1 match

@danieledrisianUpdated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

reachingFreeTierLimitmain.tsx4 matches

@andreterronUpdated 1 year ago
1import { paginateAPI } from "https://esm.town/v/andreterron/paginateAPI";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3import process from "node:process";
15 };
16 const me = await fetchJSON(
17 "https://api.val.town/v1/me",
18 opts,
19 );
20 const vals = await paginateAPI(
21 `https://api.val.town/v1/users/${me.id}/vals?limit=100`,
22 opts,
23 );

createGeneratedValmain.tsx2 matches

@andreterronUpdated 1 year ago
7}) {
8 const code = await runVal(
9 "andreterron.generateValCodeAPI",
10 description,
11 );
12 const val = await fetchJSON(
13 `https://api.val.town/v1/vals`,
14 {
15 method: "POST",

postWebhookTest4main.tsx1 match

@valUpdated 1 year ago
2
3export let postWebhookTest4 = fetchJSON(
4 "https://api.val.town/express/@val.postWebhook5",
5 {
6 method: "POST",

holidaysUSmain.tsx1 match

@rcoadyUpdated 1 year ago
3// Public holidays in the US in 2023
4export let holidaysUS = fetchJSON(
5 "https://date.nager.at/api/v2/publicholidays/2023/US"
6);

githubGistsmain.tsx1 match

@henriUpdated 1 year ago
3// GitHub gists
4export let githubGists = fetchJSON(
5 "https://api.github.com/users/stevekrouse/gists"
6);

myApimain.tsx1 match

@emilsallUpdated 1 year ago
1export function myApi(name) {
2 return "hiyyyy " + name;
3}

getCoolPostsmain.tsx1 match

@VictorForissierUpdated 1 year ago
2
3export function getCoolPosts() {
4 return fetch("https://hn.algolia.com/api/v1/search_by_date?tags=author_pg")
5 .then((res) => res.json())
6 .then((res) => res.hits[0].comment_text);

variablePowermain.tsx1 match

@jedahanUpdated 1 year ago
25`;
26
27 fetchJSON("https://api.magicthegathering.io/v1/cards?power=*")
28 .then(({ cards }) => {
29 const names = new Set();

gpt4main.tsx3 matches

@rlimitUpdated 1 year ago
3
4/**
5 * OpenAI text completion. https://platform.openai.com/docs/api-reference/completions
6 *
7 * val.town and rlimit.com has generously provided a free daily quota. Until the quota is met, no need to provide an API key.
8 *
9 */
10export const gpt4 = async (prompt: string, maxTokens?: number = 1000) => {
11 const parent = parentReference();
12 return await runVal("rlimit.gpt4Api", {
13 prompt,
14 valUser: parent.userHandle,

social_data_api_project3 file matches

@tsuchi_yaUpdated 6 hours ago

simple-scrabble-api1 file match

@bryUpdated 23 hours 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