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=846&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 11437 results for "api"(1962ms)

sqliteExplorerAppmain.tsx2 matches

@rchasman•Updated 10 months ago
27 <head>
28 <title>SQLite Explorer</title>
29 <link rel="preconnect" href="https://fonts.googleapis.com" />
30
31 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
32 <link
33 href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
34 rel="stylesheet"
35 />

blob_adminREADME.md1 match

@vhmartinezm•Updated 10 months ago
9[![](https://stevekrouse-button.express.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
12
13# TODO

cyanGuppymain.tsx5 matches

@niek•Updated 10 months ago
25
26export let spotifyRequestToken = ({ client_id, client_secret, code, redirect_uri }) =>
27 fetchJSON("https://accounts.spotify.com/api/token", {
28 method: "POST",
29 body: querystring({
39
40export let spotifyRefreshToken = async ({ refresh_token, client_id, client_secret }) =>
41 fetch("https://accounts.spotify.com/api/token", {
42 method: "POST",
43 body: new URLSearchParams({
193
194 try {
195 const currentlyPlaying = await fetch("https://api.spotify.com/v1/me/player/currently-playing", {
196 method: "GET",
197 headers: {
209
210 if (!mostRecentTrack) {
211 const recentTracks = await fetch("https://api.spotify.com/v1/me/player/recently-played", {
212 method: "GET",
213 headers: {
234
235 try {
236 const playStateResponse = await fetch("https://api.spotify.com/v1/me/player?market=US", {
237 method: "GET",
238 headers: {

huggingfacePipelinemain.tsx17 matches

@yawnxyz•Updated 10 months ago
1const HUGGING_FACE_API_URL = "https://api-inference.huggingface.co/models";
2const HUGGING_FACE_API_KEY = Deno.env.get("HUGGING_FACE_API_KEY");
3
4const defaultModels = {
60
61 async featureExtraction(input, options) {
62 return this.callHuggingFaceAPI(input, options);
63 }
64
65 async textClassification(input, options) {
66 return this.callHuggingFaceAPI(input, options);
67 }
68
69 async tokenClassification(input, options) {
70 return this.callHuggingFaceAPI(input, options);
71 }
72
73 async questionAnswering(input, options) {
74 return this.callHuggingFaceAPI(input, options);
75 }
76
77 async summarization(input, options) {
78 return this.callHuggingFaceAPI(input, options);
79 }
80
81 async translation(input, options) {
82 return this.callHuggingFaceAPI(input, options);
83 }
84
85 async textGeneration(input, options) {
86 return this.callHuggingFaceAPI(input, options);
87 }
88
89 async sentenceSimilarity(input, options) {
90 return this.callHuggingFaceAPI(input, options);
91 }
92
93 async callHuggingFaceAPI(payload, options) {
94 try {
95 const response = await fetch(`${HUGGING_FACE_API_URL}/${this.model}`, {
96 method: "POST",
97 headers: {
98 "Authorization": `Bearer ${HUGGING_FACE_API_KEY}`,
99 "Content-Type": "application/json"
100 },
104 if (!response.ok) {
105 const error = await response.json();
106 console.error("Hugging Face API Error:", error);
107 return { error: `API request failed: ${error.error}` };
108 }
109
111 return data;
112 } catch (error) {
113 console.error("Error calling Hugging Face API:", error);
114 return { error: "Error calling Hugging Face API" };
115 }
116 }

sqliteExplorerAppREADME.md1 match

@vawogbemi•Updated 10 months ago
13## Authentication
14
15Login to your SQLite Explorer with [password authentication](https://www.val.town/v/pomdtr/password_auth) with your [Val Town API Token](https://www.val.town/settings/api) as the password.
16
17## Todos / Plans

sqliteExplorerAppmain.tsx2 matches

@vawogbemi•Updated 10 months ago
27 <head>
28 <title>SQLite Explorer</title>
29 <link rel="preconnect" href="https://fonts.googleapis.com" />
30
31 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
32 <link
33 href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
34 rel="stylesheet"
35 />

OpenAIREADME.md3 matches

@wangqiao1234•Updated 10 months ago
1# OpenAI - [Docs ↗](https://docs.val.town/std/openai)
2
3Use OpenAI's chat completion API with [`std/openai`](https://www.val.town/v/std/openai). This integration enables access to OpenAI's language models without needing to acquire API keys.
4
5For free Val Town users, [all calls are sent to `gpt-3.5-turbo`](https://www.val.town/v/std/openaiproxy?v=5#L69).
34If these limits are too low, let us know! You can also get around the limitation by using your own keys:
35
361. Create your own API key on [OpenAI's website](https://platform.openai.com/api-keys)
372. Create an [environment variable](https://www.val.town/settings/environment-variables?adding=true) named `OPENAI_API_KEY`
383. Use the `OpenAI` client from `npm:openai`:
39

blob_adminREADME.md1 match

@vawogbemi•Updated 10 months ago
9[![](https://stevekrouse-button.express.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
12
13# TODO

readwiseHighlightsmain.tsx2 matches

@zerovox•Updated 10 months ago
11 queryParams.append("pageCursor", nextPageCursor);
12 }
13 console.log("Making export api request with params " + queryParams.toString());
14 const response = await fetch("https://readwise.io/api/v2/export/?" + queryParams.toString(), {
15 method: "GET",
16 headers: {

readwiseHighlightsREADME.md1 match

@zerovox•Updated 10 months ago
1https://readwise.io/api_deets
2
3Not sure how to convert from a reader ID (string) to a readwise ID (number)

mod-interview-api1 file match

@twschiller•Updated 16 hours ago

daily-advice-app1 file match

@dcm31•Updated 3 days ago
Random advice app using Advice Slip API
apiv1
papimark21