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=833&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 10642 results for "api"(897ms)

blogmain.tsx2 matches

@pomdtr•Updated 1 year ago
1// title: How does this work ?
2
3import { api } from "https://esm.town/v/pomdtr/api";
4import { article } from "https://esm.town/v/pomdtr/article";
5import { extractMetadata } from "https://esm.town/v/pomdtr/extractMetadata";
62
63async function findMyArticles() {
64 let { data: articles } = await api(`/v1/search/vals?query=${encodeURIComponent("#blog")}`);
65
66 return articles.filter(val => {

uploadByURLmain.tsx1 match

@stevedylandev•Updated 1 year ago
9 const data = new FormData()
10 data.append("file", blob)
11 const upload = await fetch('https://api.pinata.cloud/pinning/pinFileToIPFS', {
12 method: 'POST',
13 headers: {

search_heroiconsmain.tsx1 match

@pomdtr•Updated 1 year ago
2
3export default async function(ctx: BrowserContext) {
4 const resp = await fetch("https://api.iconify.design/collection?prefix=heroicons");
5 if (!resp.ok) {
6 throw new Error(await resp.text());

sqliteExplorerAppREADME.md1 match

@nbbaier•Updated 1 year ago
13## Authentication
14
15Login to your SQLite Explorer with [password authentication](https://www.val.town/v/pomdtr/password_auth) with your [Val Town API Token](https://www.val.town/settings/api) as the password.
16
17## Todos / Plans

glifJsonmain.tsx1 match

@cjpais•Updated 1 year ago
12 return randomItems;
13 };
14 const url = `https://alpha.glif.xyz/api/glifs?id=${id}`;
15 try {
16 const response = await fetch(url);

mgsrBotEndpointmain.tsx1 match

@rayman•Updated 1 year ago
49 JSON.stringify(
50 await (await fetch(
51 "https://api.val.town/v1/eval/"
52 + encodeURIComponent(req.body.data.options[0].value),
53 {

search_user_valsmain.tsx1 match

@pomdtr•Updated 1 year ago
4export default async function(ctx: BrowserContext<{ user: string }>) {
5 const { user: userID } = ctx.params;
6 const resp = await fetch(`https://api.val.town/v1/users/${userID}/vals?limit=100`, {
7 headers: {
8 Authorization: `Bearer ${Deno.env.get("valtown")}`,

mgsrBotEndpoint2main.tsx1 match

@stevekrouse•Updated 1 year ago
67 case "eval":
68 const evalResponse = await fetch(
69 `https://api.val.town/v1/eval/${encodeURIComponent(body.data.options[0].value)}`,
70 { headers: { "Content-Type": "application/json" } },
71 );

untitled_jadeLizardmain.tsx1 match

@trea•Updated 1 year ago
18 }
19 const release = await fetchJSON(
20 `https://api.github.com/repos/aryeohq/aryeo/releases/latest`,
21 );
22

receiveEmailAndConvertToPDFmain.tsx4 matches

@tmcw•Updated 1 year ago
3
4/**
5 * This requires a free API token from browserless.io saved in your
6 * Env Variables as BROWSERLESS_API_KEY
7 */
8let sendPDF = async (subject, html) => {
9 const browserlessApi = Deno.env.get("BROWSERLESS_API_KEY");
10 const browser = await puppeteer.connect({
11 browserWSEndpoint: `wss://chrome.browserless.io?token=${browserlessApi}`,
12 });
13 const page = await browser.newPage();

daily-advice-app1 file match

@dcm31•Updated 1 day ago
Random advice app using Advice Slip API

gptApiTemplate1 file match

@charmaine•Updated 2 days ago
apiv1
papimark21