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/$%7Burl%7D?q=api&page=1535&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 18048 results for "api"(1413ms)

telegramSendMessagemain.tsx3 matches

@sjmre•Updated 1 year ago
17}) =>
18 fetchJSON(
19 `https://api.telegram.org/bot${botToken}/sendMessage`,
20 {
21 method: "POST",
25
26export async function telegramSendAudioMessage(chatId: string, audioData: Uint8Array, botToken: string): Promise<void> {
27 const url = `https://api.telegram.org/bot${botToken}/sendAudio`;
28
29 // Assuming FormData is available or correctly polyfilled
34
35 try {
36 // Replace axios with Deno's fetch API, adapted for your setup
37 const response = await fetch(url, {
38 method: "POST",

azureNewtmain.tsx1 match

@suhaasy•Updated 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();

valToGHmain.tsx2 matches

@nbbaier•Updated 1 year ago
1import { API_URL } from "https://esm.town/v/std/API_URL?v=5";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=42";
3import { Octokit } from "npm:@octokit/rest";
127
128 try {
129 const { code } = await fetchJSON(`${API_URL}/v1/alias/${vtUser}/${valName}`, {
130 headers: { "Authorization": `Bearer ${Deno.env.get("valtown")}` },
131 });

openaiUploadFilemain.tsx1 match

@yawnxyz•Updated 1 year ago
17 formData.append("purpose", purpose);
18 formData.append("file", file, filename);
19 let result = await fetch("https://api.openai.com/v1/files", {
20 method: "POST",
21 headers: {

valTownSearchREADME.md1 match

@pomdtr•Updated 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

@stevekrouse•Updated 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

@pomdtr•Updated 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

@pomdtr•Updated 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

@stevekrouse•Updated 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

@stevekrouse•Updated 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: {

Apiify11 file matches

@wolf•Updated 8 hours ago

dailyQuoteAPI

@Souky•Updated 2 days ago
Kapil01
apiv1