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%20%22Optional%20title%22?q=api&page=1626&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 18084 results for "api"(1431ms)

SearchValTownmain.tsx1 match

@pomdtr•Updated 1 year ago
5 query,
6 });
7 const searchURL = `https://www.val.town/api/trpc/search?input=${
8 encodeURIComponent(input)
9 }`;

myApimain.tsx1 match

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

telegramWebhookCompramain.tsx1 match

@marcecoll•Updated 1 year ago
8 // Verify this webhook came from our bot
9 if (
10 req.headers.get("x-telegram-bot-api-secret-token") !==
11 process.env.telegramWebhookSecret
12 ) {

fetchCongressTradeReportsmain.tsx1 match

@nari•Updated 1 year ago
11export async function fetchCongressTradeReports(callback) {
12 const res = await fetchJSON(
13 "https://bff.capitoltrades.com/trades?sortBy=-pubDate"
14 );
15 const trades = res.data;

communityBoatingFlagmain.tsx1 match

@twschiller•Updated 1 year ago
2
3export async function communityBoatingFlag() {
4 const response = await fetch("https://api.community-boating.org/api/flag");
5 const text = await response.text();
6 // Regex by Chat GPT :shrug:

emailDailyJokemain.tsx1 match

@jay•Updated 1 year ago
4 async function fetchJoke() {
5 let response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 if (response.ok) {

myApimain.tsx1 match

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

openAiTextCompletionmain.tsx8 matches

@patrickjm•Updated 1 year ago
2
3export let openAiTextCompletion = async (params: {
4 /** https://beta.openai.com/account/api-keys */
5 apiKey: string,
6 /** Optional. https://beta.openai.com/account/org-settings */
7 org?: string,
8
9 // REST args, see https://beta.openai.com/docs/api-reference/completions/create
10 prompt: string,
11 model?: string,
25 user?: string,
26}) => {
27 if (!params.apiKey) {
28 throw new Error(
29 "Please provide 'apiKey' param. See: https://beta.openai.com/account/api-keys "
30 );
31 }
32 const { apiKey, org, ...args } = params;
33 args.stream = false;
34
35 const response = await fetchJSON("https://api.openai.com/v1/completions", {
36 method: "POST",
37 headers: {
38 Authorization: `Bearer ${params.apiKey}`,
39 ...(params.org ? { "OpenAI-Organization": params.org } : {}),
40 },

timemain.tsx1 match

@vs•Updated 1 year ago
3export async function time() {
4 return await fetchJSON(
5 "https://api.openaq.org/v2/latest?" +
6 new URLSearchParams({
7 limit: "10",

githubFollowersmain.tsx1 match

@rym•Updated 1 year ago
3// GitHub followers
4export let githubFollowers = fetchJSON(
5 "https://api.github.com/users/stevekrouse/followers"
6);

Apiify11 file matches

@wolf•Updated 15 hours ago

dailyQuoteAPI

@Souky•Updated 2 days ago
apiry
Kapil01