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=964&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 11604 results for "api"(1121ms)

myApiAddmain.tsx1 match

@acmuUpdated 1 year ago
2let { nameList } = await import("https://esm.town/v/acmu/nameList");
3
4export async function myApiAdd(name) {
5 if (Array.isArray(nameList)) {
6 nameList.push(name);

textToImageDallemain.tsx1 match

@hootzUpdated 1 year ago
13 }[];
14 } = await fetchJSON(
15 "https://api.openai.com/v1/images/generations",
16 {
17 method: "POST",

myApimain.tsx1 match

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

myApimain.tsx1 match

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

fetchWikipediaContentmain.tsx2 matches

@fab1anUpdated 1 year ago
4 try {
5 const title = url.split("/wiki/")[1];
6 const apiUrl = `https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro&explaintext&format=json&origin=*&titles=${title}`;
7 const response = await fetch(apiUrl);
8 const data = await response.json();
9 const pageId = Object.keys(data.query.pages)[0];

sendMessagemain.tsx1 match

@ptnUpdated 1 year ago
2
3export async function sendMessage(ptnKey: string, message: string) {
4 await fetch("https://app.phonetonote.com/hooks/zapier", {
5 body: JSON.stringify({
6 ptn_key: ptnKey,

myApimain.tsx1 match

@benfwallaUpdated 1 year ago
1export function myApi(name) {
2 var sentence = "hi " + name;
3 console.email(sentence);

myApimain.tsx1 match

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

myApimain.tsx1 match

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

apimain.tsx1 match

@uuzUpdated 1 year ago
2import { gpt3 } from "https://esm.town/v/patrickjm/gpt3?v=4";
3
4export let api = async ({ prompt = "讲一个笑话" }) => {
5 return gpt3({
6 openAiKey: process.env.openai_key,

new-val-api-21 file match

@shouserUpdated 11 hours ago
This is an example of using the API to create a val.

gptApiTemplate2 file matches

@charmaineUpdated 1 day ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration