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/image-url.jpg?q=api&page=1002&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 12642 results for "api"(2258ms)

myApimain.tsx1 match

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

leaderboardmain.tsx1 match

@sqlite•Updated 1 year ago
10 const table = stripAnsi(renderTable(zip(res)));
11
12 const resp = await fetch("https://sourcecodeshots.com/api/image", {
13 method: "POST",
14 headers: {

httpmain.tsx1 match

@rlimit•Updated 1 year ago
6
7/**
8 * API Client for interfacing with the RateLimit API. Uses free tier rlimit.com credentials.
9 */
10export class RateLimit {

slackBotExamplemain.tsx1 match

@maxm•Updated 1 year ago
16 // like the sender and the message text
17 const result = await fetchJSON(
18 "https://slack.com/api/chat.postMessage",
19 {
20 headers: {

telegramWebhookExamplemain.tsx1 match

@maxm•Updated 1 year ago
4 // Verify this webhook came from our bot
5 if (
6 req.headers.get("x-telegram-bot-api-secret-token")
7 !== Deno.env.get("telegramWebhookSecret")
8 ) {

nasaAPODmain.tsx1 match

@henrii•Updated 1 year ago
2
3// Returns NASA's Astronomy Picture of the Day (APOD)
4export const nasaAPOD = await fetchJSON("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY");
5console.log(nasaAPOD.url);
6

gptTagmain.tsx1 match

@vladimyr•Updated 1 year ago
3async function getOpenAI() {
4 // if you don't have a key, use our std library version
5 if (Deno.env.get("OPENAI_API_KEY") === undefined) {
6 const { OpenAI } = await import("https://esm.town/v/std/openai");
7 return new OpenAI();

chatmain.tsx1 match

@andreterron•Updated 1 year ago
3async function getOpenAI() {
4 // if you don't have a key, use our std library version
5 if (Deno.env.get("OPENAI_API_KEY") === undefined) {
6 const { OpenAI } = await import("https://esm.town/v/std/openai");
7 return new OpenAI();

fetchNewPublicGitHubReposmain.tsx3 matches

@stevekrouse•Updated 1 year ago
7 const order = "desc";
8
9 const url = `https://api.github.com/search/repositories?q=${encodeURIComponent(query)}&sort=${sort}&order=${order}`;
10
11 const response = await fetch(url, {
12 headers: {
13 "Accept": "application/vnd.github.v3+json",
14 "User-Agent": "Deno-GitHub-Repo-Fetcher", // GitHub API requires a user-agent header
15 },
16 });
17
18 if (!response.ok) {
19 throw new Error(`GitHub API responded with status: ${response.status}`);
20 }
21

http_request_examplemain.tsx2 matches

@pomdtr•Updated 1 year ago
4 */
5
6// To make a request to a server, you use the `fetch` API.
7let resp = await fetch("https://example.com");
8
32 headers: {
33 "Content-Type": "application/json",
34 "X-API-Key": "foobar",
35 },
36 body,

vapi-minutes-db1 file match

@henrywilliams•Updated 6 hours ago

vapi-minutes-db2 file matches

@henrywilliams•Updated 8 hours ago
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com
mux
Your friendly, neighborhood video API.