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%22Optional%20title%22?q=api&page=1421&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 15315 results for "api"(1262ms)

myApimain.tsx1 match

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

chatmain.tsx2 matches

@darrinm•Updated 1 year ago
1import { chatMessages } from "https://esm.town/v/darrinm/chatMessages";
2
3// https://api.val.town/express/@darrinm.chat
4export const chat = (req, res) => {
5 const messages = chatMessages.map(({ message, sender }) =>
22 document.getElementById("message-input").value = '';
23 const ul = document.getElementById("inbox");
24 const data = await fetch("https://api.val.town/v1/eval/@darrinm.sendChatMessage('" + message + "','"+ sender + "')")
25 .then(res => res.json())
26 .then(res => res.data)

myApimain.tsx1 match

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

searchClosestWikimain.tsx2 matches

@fab1an•Updated 1 year ago
11 "https://deno.land/x/deno_dom/deno-dom-wasm.ts"
12 );
13 const searchUrl = `https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=${encodeURIComponent(
14 searchQuery
15 )}&srwhat=text&format=json&utf8=1&origin=*`;
20 }
21 const pageTitle = searchData.query.search[0].title;
22 const contentUrl = `https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro&titles=${encodeURIComponent(
23 pageTitle
24 )}&format=json&utf8=1&origin=*`;

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

countmain.tsx1 match

@baj•Updated 1 year ago
1export const count = (async () => {
2 let count = 0;
3 function myApi() {
4 return count++;
5 }

githubStarsmain.tsx1 match

@joshmock•Updated 1 year ago
2
3export async function githubStars(username) {
4 let res = await fetch(`https://api.github.com/users/${username}/starred`);
5 return await res.json();
6}

myApimain.tsx1 match

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

HN-fetch-call2 file matches

@ImGqb•Updated 1 day ago
fetch HackerNews by API

token-server1 file match

@kwhinnery_openai•Updated 2 days ago
Mint tokens to use with the OpenAI Realtime API for WebRTC
Kapil01
apiv1