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/$%7Burl%7D?q=api&page=1281&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 14309 results for "api"(2073ms)

18 );
19 const chatModel = new ChatOpenAI({
20 openAIApiKey: process.env.OPENAI_API_KEY,
21 });
22 /* Create the vectorstore */
29 [{ id: 2 }, { id: 1 }, { id: 3 }],
30 new OpenAIEmbeddings({
31 openAIApiKey: process.env.OPENAI_API_KEY,
32 }),
33 );

starWarsmain.tsx2 matches

@hanssep•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);

valFormmain.tsx1 match

@rodrigotello•Updated 1 year ago
17 const args = Array.from(formData.values()).map(Number);
18
19 fetch('https://api.val.town/v1/run/rodrigotello.multiplicationFunctionTest', {
20 method: 'POST',
21 headers: { 'Content-Type': 'application/json' },

selfmain.tsx1 match

@eralp•Updated 1 year ago
2
3export let self = async () {
4 const response = await fetch("https://api.val.town/eval/@eralp.self")
5 const json = await response.json();
6 return json.data;

githubFollowersmain.tsx1 match

@eagle251•Updated 1 year ago
3// GitHub followers
4export let githubFollowers = fetchJSON(
5 "https://api.github.com/users/stevekrouse/followers"
6);

myApimain.tsx1 match

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

myApimain.tsx1 match

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

getGithubUsermain.tsx1 match

@vtdocs•Updated 1 year ago
3export const getGithubUser = async (username: string) => {
4 const user = await fetchJSON(
5 `https://api.github.com/users/${username}`,
6 );
7 return user;

myApimain.tsx1 match

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

myApimain.tsx1 match

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

createemailapiv22 file matches

@souravvmishra•Updated 3 hours ago

waec_api6 file matches

@seyistry•Updated 9 hours ago
snartapi
mux
Your friendly, neighborhood video API.