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/$%7Bart_info.art.src%7D?q=api&page=961&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 12282 results for "api"(2200ms)

valTownSearchREADME.md1 match

@pomdtrUpdated 1 year ago
1# [Val Town Search](https://val-town-search.pomdtr.me)
2
3Search for vals using the Github API.
4
5Either use the provided UI, or the query param:

insecureSSLCertExamplemain.tsx1 match

@stevekrouseUpdated 1 year ago
1import { insecureFetch } from "https://esm.town/v/stevekrouse/insecureFetch";
2
3const url = "https://assignment-api.uspto.gov/patent/basicSearch?query=1234567&fields=main&rows=20";
4const data = await insecureFetch(url);
5const text = await data.text();

valtownByExamplemain.tsx1 match

@pomdtrUpdated 1 year ago
1/** @jsxImportSource npm:hono/jsx **/
2
3import { api } from "https://esm.town/v/pomdtr/api";
4import { honoMiddleware } from "https://esm.town/v/pomdtr/codeOnValTown";
5import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";

dependenciesmain.tsx2 matches

@pomdtrUpdated 1 year ago
1import { api } from "https://esm.town/v/pomdtr/api";
2
3type ValRef = {
23export async function searchReferences(val: ValRef) {
24 const esmUrl = `https://esm.town/v/${val.author}/${val.name}`;
25 const { data: vals } = await api(`/v1/search/vals?query=${encodeURIComponent(esmUrl)}`, {
26 authenticated: true,
27 paginate: true,

insecureFetchREADME.md1 match

@stevekrouseUpdated 1 year ago
8import { insecureFetch } from "https://esm.town/v/stevekrouse/insecureFetch";
9
10const url = "https://assignment-api.uspto.gov/patent/basicSearch?query=1234567&fields=main&rows=20";
11const data = await insecureFetch(url)
12const text = await data.text();

openaiUploadFilemain.tsx1 match

@stevekrouseUpdated 1 year ago
16 formData.append("purpose", purpose);
17 formData.append("file", file, "data.json");
18 let result = await fetch("https://api.openai.com/v1/files", {
19 method: "POST",
20 headers: {

val_town_by_example_parsemain.tsx3 matches

@pomdtrUpdated 1 year ago
1import { api } from "https://esm.town/v/pomdtr/api";
2
3export type Example = {
87
88export async function parseExample(author: string, name: string): Promise<Example> {
89 let { code } = await api<{ code: string }>(`/v1/alias/${author}/${name}`);
90 // Substitute $std/ with the full import url
91 code = code.replaceAll("$std/", "https://deno.land/std@0.207.0/");
141 for (const slug of vals) {
142 const [author, name] = slug.split("/");
143 const { code } = await api(`/v1/alias/${author}/${name}`);
144 example.vals.push({
145 author,

apimain.tsx4 matches

@pomdtrUpdated 1 year ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2
3export async function api<T = any>(
4 path: string,
5 options?: RequestInit & {
11 if (options?.paginate) {
12 const data = [];
13 let url = new URL(`${API_URL}${path}`);
14 url.searchParams.set("limit", "100");
15
32 return { data } as T;
33 }
34 const resp = await fetch(`${API_URL}${path}`, {
35 ...options,
36 headers: {

apimain.tsx4 matches

@zeroftdevUpdated 1 year ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2
3export async function api<T = any>(
4 path: string,
5 options?: RequestInit & {
11 if (options?.paginate) {
12 const data = [];
13 let url = new URL(`${API_URL}${path}`);
14 url.searchParams.set("limit", "100");
15
32 return { data } as T;
33 }
34 const resp = await fetch(`https://api.val.town${path}`, {
35 ...options,
36 headers: {

CS1200SystemsDevmain.tsx1 match

@stephencooley123Updated 1 year ago
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();

social_data_api_project3 file matches

@tsuchi_yaUpdated 2 days ago

simple-scrabble-api1 file match

@bryUpdated 5 days ago
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
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com