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=5&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 18780 results for "api"(1887ms)

sapientGrayLamprey

@agiron123•Updated 1 month ago

PassphraseAPI2 file matches

@wolf•Updated 1 month ago

openapi2 file matches

@stevekrouse•Updated 1 month ago

dbToAPI_backup4 file matches

@nbbaier•Updated 1 month ago

perplexityAPI2 file matches

@nbbaier•Updated 1 month ago

dbToAPI4 file matches

@nbbaier•Updated 1 month ago

leadGeneratorAPI1 file match

@run•Updated 1 month ago

DualLangWebSpeechAPI1 file match

@Get•Updated 1 month ago

productSummaryApi1 file match

@nulo•Updated 2 months ago

memoryApiExample1 file match

@toowired•Updated 2 months ago

MusicPracticeTodoApp.tsx3 matches

@buzdygan•Updated 44 mins ago
16
17 const load = async () => {
18 const res = await fetch("/api/todos");
19 const data: Todo[] = await res.json();
20 setTodos(data);
27 const add = async (e: React.FormEvent) => {
28 e.preventDefault();
29 await fetch("/api/todos", {
30 method: "POST",
31 headers: { "Content-Type": "application/json" },
37
38 const complete = async (id: number) => {
39 await fetch("/api/complete", {
40 method: "POST",
41 headers: { "Content-Type": "application/json" },

MusicPracticetodos.ts2 matches

@buzdygan•Updated 49 mins ago
44 const url = new URL(req.url);
45 const data = await req.json();
46 if (url.pathname.endsWith("/api/todos")) {
47 db.prepare("INSERT INTO todos (text) VALUES (?)").run(data.text);
48 return new Response("ok");
49 }
50 if (url.pathname.endsWith("/api/complete")) {
51 const id = data.id;
52 const today = getToday();
apiry
snartapi