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/$%7Bsuccess?q=api&page=1022&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 11836 results for "api"(2091ms)

myApimain.tsx1 match

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

myApimain.tsx1 match

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

userValsmain.tsx1 match

@neverstew•Updated 1 year ago
37 : {};
38 return fetchJSON(
39 `https://api.val.town/v1/users/${id}/vals`,
40 { headers },
41 );

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

capitalizeWordmain.tsx3 matches

@mkeller7•Updated 1 year ago
1export let capitalizeWord = async (word) => {
2 const { capitalize } = await import("npm:lodash-es");
3 return capitalize(word);
4};

openAiModerationmain.tsx7 matches

@patrickjm•Updated 1 year ago
3/**
4 * Calls the OpenAI moderation model. Useful for determining if OpenAI will flag something you did.
5 * https://platform.openai.com/docs/api-reference/moderations
6 */
7export let openAiModeration = async ({
8 apiKey,
9 input,
10 model,
11}: {
12 apiKey: string,
13 input: string|string[],
14 model?: "text-moderation-latest" | "text-moderation-stable",
15}) => {
16 if (!apiKey) {
17 throw new Error("You must provide an OpenAI API Key");
18 }
19 const body: { model?: string, input: string|string[] } = {
24 }
25 const result = await fetchJSON(
26 "https://api.openai.com/v1/moderations",
27 {
28 method: "POST",
29 headers: {
30 Authorization: `Bearer ${apiKey}`,
31 },
32 body: JSON.stringify(body),

myApimain.tsx1 match

@salman•Updated 1 year ago
1export function myApi(url) {
2 return "https://tldrify.com/ajaxproxy?url=" + url;
3}

simple-scrabble-api1 file match

@bry•Updated 6 hours ago

social_data_api_project3 file matches

@tsuchi_ya•Updated 14 hours ago
apiv1
papimark21