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=1003&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 11900 results for "api"(1737ms)

hootsuiteNasamain.tsx2 matches

@stevekrouse•Updated 1 year ago
2
3export async function hootsuiteNasa(req: express.Request, res: express.Response) {
4 const NASA_ROOT = "https://images-api.nasa.gov";
5 const alphaNumericSpaces = new RegExp("^[a-zA-Z0-9\\s-_]+$");
6 const acceptableRedirectUri = new RegExp(
7 "^https:\/\/api-auth.hootsuite.com\/app-directory\/apps\/[0-9]+\/oauth2\/callback$",
8 );
9 if (req.path === "/v1/media") {

getRandomPokemonmain.tsx1 match

@gabby•Updated 1 year ago
3export let getRandomPokemon = async () => {
4 const id = Math.floor(Math.random() * 151);
5 const url = `https://pokeapi.co/api/v2/pokemon/${id}`;
6 const data = await fetchData(url);
7 console.log(data.name);

myApimain.tsx1 match

@jakesing•Updated 1 year ago
1import { myName } from "https://esm.town/v/jakesing/myName";
2
3export function myApi() {
4 return "hi " + myName;
5}

myApimain.tsx1 match

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

convertTodoItemsToGamePlansmain.tsx5 matches

@thomasatflexos•Updated 1 year ago
33 "model": "gpt-3.5-turbo",
34 });
35 let openApiKey = process.env.OPEN_API_KEY;
36 var requestOptions = {
37 method: "POST",
38 headers: {
39 "Content-Type": "application/json",
40 "Authorization": `Bearer ${openApiKey}`,
41 },
42 body: rawBody,
43 redirect: "follow",
44 };
45 let openApiResponse = await fetch(
46 "https://api.openai.com/v1/chat/completions",
47 requestOptions,
48 );
49 let jsonResponse = await openApiResponse.json();
50 let choice = jsonResponse?.choices[0]?.message.content;
51 if (!choice) {

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

githubFollowingmain.tsx1 match

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

myApimain.tsx1 match

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

social_data_api_project3 file matches

@tsuchi_ya•Updated 1 day ago

simple-scrabble-api1 file match

@bry•Updated 2 days ago
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com
mux
Your friendly, neighborhood video API.