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=1012&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 12104 results for "api"(1987ms)

myApimain.tsx1 match

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

curveMinusServermain.tsx2 matches

@ralfw•Updated 1 year ago
1import { curveMinusOpenAPI } from "https://esm.town/v/ralfw/curveMinusOpenAPI";
2import { curveMinusManifest } from "https://esm.town/v/ralfw/curveMinusManifest";
3import { curveMinus } from "https://esm.town/v/ralfw/curveMinus";
12 });
13 app.get("/ai-plugin.json", (c) => c.text(curveMinusManifest));
14 app.get("/openapi.yaml", (c) => c.text(curveMinusOpenAPI));
15 return app.fetch(req);
16};

myApimain.tsx1 match

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

myApimain.tsx1 match

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

discordMessagesmain.tsx1 match

@stevekrouse•Updated 1 year ago
3export function discordMessages({ botToken, channelId }) {
4 return fetchJSON(
5 `https://discord.com/api/channels/${channelId}/messages`,
6 {
7 headers: {

hnSearchByDatemain.tsx1 match

@stevekrouse•Updated 1 year ago
2
3export let hnSearchByDate = (params) => fetchJSON(
4 `http://hn.algolia.com/api/v1/search_by_date?${new URLSearchParams(params)}`
5)
15 const llm = new ChatOpenAI({
16 modelName: "gpt-3.5-turbo",
17 openAIApiKey: process.env.openai,
18 temperature: 0,
19 });

runValAPIExmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { runValAPI } from "https://esm.town/v/stevekrouse/runValAPI";
2
3export const runValAPIEx = runValAPI("@patrickjm.gpt3", {
4 prompt: "write me a limerick about sandboxing javascript",
5});

valtownAPIExamplesmain.tsx5 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let valtownAPIExamples = [
4 "https://api.val.town/v1/alias/stevekrouse",
5 "https://api.val.town/v1/users/a0bf3b31-15a5-4d5c-880e-4b1e22c9bc18",
6 "https://api.val.town/v1/alias/stevekrouse/fetchJSON",
7 "https://api.val.town/v1/vals/18b54b4e-779a-4c56-8ee6-4c75af7e55f0",
8].map(fetchJSON);

getMessagesmain.tsx1 match

@stevekrouse•Updated 1 year ago
3
4export let getMessages = (channelId) => fetchJSON(
5 `https://discord.com/api/channels/${channelId}/messages`, {
6 headers: {
7 "Authorization": `Bot ${discordBotToken}`,

social_data_api_project3 file matches

@tsuchi_ya•Updated 1 day ago

simple-scrabble-api1 file match

@bry•Updated 4 days ago
mux
Your friendly, neighborhood video API.
api