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=1384&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 15629 results for "api"(7361ms)

myApimain.tsx1 match

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

myApimain.tsx1 match

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

valmain.tsx1 match

@neverstew•Updated 1 year ago
30 : {};
31 return fetchJSON(
32 "https://api.val.town/v1/vals/" + id,
33 { headers },
34 );

runmain.tsx1 match

@pomdtr•Updated 1 year ago
11 contentType = "application/json";
12 }
13 url.host = "api.val.town";
14 url.pathname = `v1/run/${owner}.${name}`;
15 const body = await req.text();

myApimain.tsx1 match

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

myApimain.tsx1 match

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

paginateAPImain.tsx1 match

@andreterron•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const paginateAPI = async (
4 url: string,
5 options: Parameters<typeof fetch>[1],

sendToPushDeermain.tsx1 match

@LavaC•Updated 1 year ago
5 let key = pushDeerKey;
6 await fetch(
7 `https://api2.pushdeer.com/message/push?pushkey=${key}&text=${msg}`
8 );
9};

starWarsmain.tsx2 matches

@dexa•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Explore the Star Wars universe, from StarWarsAPI
4export let starWars = fetchJSON(
5 "https://swapi.dev/api/people/1/"
6);

myApimain.tsx1 match

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

googleGeminiAPI2 file matches

@michaelwschultz•Updated 5 hours ago

HN-fetch-call2 file matches

@ImGqb•Updated 3 days ago
fetch HackerNews by API
Kapil01
apiv1