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=339&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 9424 results for "api"(822ms)

vtProjectSearch2import.ts1 match

@charmaine•Updated 3 weeks ago
37 profile_image_url: user.profileImageUrl,
38 url: user.url,
39 updated_at: new Date().toISOString(), // Using current time as the API doesn't provide updated_at
40 });
41

vtProjectSearch2deno.lock2 matches

@charmaine•Updated 3 weeks ago
363 },
364 "redirects": {
365 "https://esm.town/v/std/API_URL": "https://esm.town/v/std/API_URL?v=5",
366 "https://esm.town/v/stevekrouse/sqlite": "https://esm.town/v/stevekrouse/sqlite?v=13"
367 },
368 "remote": {
369 "https://docs.val.town/pagefind/pagefind.js": "43ee232b23e27fa6b00d4f71f08a165d35a824947525989c7a051843e408e0c0",
370 "https://esm.town/v/std/API_URL?v=5": "46109f905a50e32281d3ffbe7b9c8209a778290c5274d83d131fba2d26c4974d",
371 "https://esm.town/v/stevekrouse/sqlite?v=13": "3b613197e9da35db335dc2726c062c61f9247439c10a0c64c118994e200ffa46"
372 }

vtProjectSearch2components.tsx8 matches

@charmaine•Updated 3 weeks ago
1062 <link rel="icon" href="https://fav.farm/👀" />
1063 <meta name="viewport" content="width=device-width, initial-scale=1" />
1064 <link rel="preconnect" href="https://fonts.googleapis.com" />
1065 <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
1066 <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap" rel="stylesheet" />
1067 <style>
1068 {styles}
1073 <div className="header">
1074 <h1><a href="/" className="title-link">Val Town Code Search</a><a href="https://val.town" className="valtown-link" style={{ marginLeft: 'auto' }} >Return to Val Town</a></h1>
1075 <div className="api-info">
1076 <details>
1077 <summary>API Access</summary>
1078 <div className="api-docs">
1079 <p>You can access search results via JSON API by adding <code>format=json</code> to your query:</p>
1080 {searchTerm ? (
1081 <a href={`?q=${encodeURIComponent(searchTerm)}&page=${currentPage}&format=json`} target="_blank">
1210 <div className="search-examples">
1211 <a href="?q=fetch" className="example-link">fetch</a>
1212 <a href="?q=api" className="example-link">api</a>
1213 <a href="?q=database" className="example-link">database</a>
1214 <a href="?q=image" className="example-link">image</a>
1355 <div className="search-examples">
1356 <a href="?q=fetch" className="example-link">fetch</a>
1357 <a href="?q=api" className="example-link">api</a>
1358 <a href="?q=database" className="example-link">database</a>
1359 <a href="?q=image" className="example-link">image</a>

vtProjectSearch2api.tsx2 matches

@charmaine•Updated 3 weeks ago
13import { searchDocs, searchDocsCount } from "./docsearch.ts";
14
15// Handle typeahead API requests
16export function handleTypeahead(req: Request): Response {
17 const url = new URL(req.url);
99 searchTerm
100 ? (needFullDocsData
101 ? searchDocs(searchTerm, page, pageSize, true) // Get full data for docs tab or JSON API
102 : searchDocsCount(searchTerm).then(count => ({ results: [], totalResults: count }))) // Just get count for other tabs in HTML view
103 : { results: [], totalResults: 0 }

vtProjectSearchapi.tsx2 matches

@charmaine•Updated 3 weeks ago
8import { SearchResponse as _SearchResponse } from "./types.tsx";
9
10// Handle typeahead API requests
11export function handleTypeahead(req: Request): Response {
12 const url = new URL(req.url);
94 searchTerm
95 ? (needFullDocsData
96 ? searchDocs(searchTerm, page, pageSize, true) // Get full data for docs tab or JSON API
97 : searchDocsCount(searchTerm).then(count => ({ results: [], totalResults: count }))) // Just get count for other tabs in HTML view
98 : { results: [], totalResults: 0 },

vtProjectSearchweb.http.tsx1 match

@charmaine•Updated 3 weeks ago
1import { handler } from "./api.tsx";
2import { loadTypeaheadDataIntoMemory } from "./db.ts";
3

vtProjectSearchstyles.tsx4 matches

@charmaine•Updated 3 weeks ago
753}
754
755.api-info {
756 margin-top: 10px;
757}
758
759.api-info summary {
760 cursor: pointer;
761 color: var(--primary-color);
763}
764
765.api-docs {
766 background-color: var(--code-bg);
767 padding: 10px 15px;
772}
773
774.api-docs code {
775 display: inline-block;
776 background-color: white;

vtProjectSearchimport.ts1 match

@charmaine•Updated 3 weeks ago
37 profile_image_url: user.profileImageUrl,
38 url: user.url,
39 updated_at: new Date().toISOString(), // Using current time as the API doesn't provide updated_at
40 });
41

vtProjectSearchdeno.lock2 matches

@charmaine•Updated 3 weeks ago
363 },
364 "redirects": {
365 "https://esm.town/v/std/API_URL": "https://esm.town/v/std/API_URL?v=5",
366 "https://esm.town/v/stevekrouse/sqlite": "https://esm.town/v/stevekrouse/sqlite?v=13"
367 },
368 "remote": {
369 "https://docs.val.town/pagefind/pagefind.js": "43ee232b23e27fa6b00d4f71f08a165d35a824947525989c7a051843e408e0c0",
370 "https://esm.town/v/std/API_URL?v=5": "46109f905a50e32281d3ffbe7b9c8209a778290c5274d83d131fba2d26c4974d",
371 "https://esm.town/v/stevekrouse/sqlite?v=13": "3b613197e9da35db335dc2726c062c61f9247439c10a0c64c118994e200ffa46"
372 }

vtProjectSearchcomponents.tsx8 matches

@charmaine•Updated 3 weeks ago
1062 <link rel="icon" href="https://fav.farm/👀" />
1063 <meta name="viewport" content="width=device-width, initial-scale=1" />
1064 <link rel="preconnect" href="https://fonts.googleapis.com" />
1065 <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
1066 <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap" rel="stylesheet" />
1067 <style>
1068 {styles}
1073 <div className="header">
1074 <h1><a href="/" className="title-link">Val Town Code Search</a><a href="https://val.town" className="valtown-link" style={{ marginLeft: 'auto' }} >Return to Val Town</a></h1>
1075 <div className="api-info">
1076 <details>
1077 <summary>API Access</summary>
1078 <div className="api-docs">
1079 <p>You can access search results via JSON API by adding <code>format=json</code> to your query:</p>
1080 {searchTerm ? (
1081 <a href={`?q=${encodeURIComponent(searchTerm)}&page=${currentPage}&format=json`} target="_blank">
1210 <div className="search-examples">
1211 <a href="?q=fetch" className="example-link">fetch</a>
1212 <a href="?q=api" className="example-link">api</a>
1213 <a href="?q=database" className="example-link">database</a>
1214 <a href="?q=image" className="example-link">image</a>
1355 <div className="search-examples">
1356 <a href="?q=fetch" className="example-link">fetch</a>
1357 <a href="?q=api" className="example-link">api</a>
1358 <a href="?q=database" className="example-link">database</a>
1359 <a href="?q=image" className="example-link">image</a>

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
papimark21
substrate
Substrate is the modular API for fast multi-step AI programs