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/$1?q=api&page=1393&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 17843 results for "api"(2605ms)

simpletextmain.tsx2 matches

@nbbaier•Updated 7 months ago
16 <meta name="viewport" content="width=device-width, initial-scale=1.0">
17 <title>${blogTitle}</title>
18 <link rel="preconnect" href="https://fonts.googleapis.com">
19 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
20 <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
21 <style>
22 @view-transition { navigation: auto; }

PhoenixProxymain.tsx3 matches

@cephalization•Updated 7 months ago
1/* Open in Val Town: https://www.val.town/v/cephalization/PhoenixProxy */
2const PHOENIX_API_KEY_NAME = "authorization";
3const HOSTED_PHOENIX_BASE_URL = "https://llamatrace.com";
4// const HOSTED_PHOENIX_BASE_URL = "https://app.phoenix.arize.com";
20 // });
21 // }
22 // Check that your valtown API key is sent in the 'x-authorization' header
23 // Delete this line if you don't mind other parties hitting this endpoint
24 // if (req.headers.get("x-authorization") !== Deno.env.get("valtown")) {
32 headers.set("Host", Url.hostname);
33 headers.set("Origin", Url.origin);
34 headers.set(PHOENIX_API_KEY_NAME, req.headers.get(PHOENIX_API_KEY_NAME) ?? "");
35 const init: RequestInit = {
36 method: req.method,

PhoenixProxyREADME.md1 match

@cephalization•Updated 7 months ago
3THIS IS NO LONGER NECESSARY
4
5This Val will proxy anthropic HTTP requests from some frontend client, like langchain, so that you can utilize anthropic apis from the browser.
6
7Convert it to an HTTP val in order to use it (you may want to setup an ENV var / header to protect the endpoint with a secret key)

deletebiomain.tsx2 matches

@yawnxyz•Updated 7 months ago
43 <script src="https://cdn.tailwindcss.com" > </script>
44 <script src="https://cdnjs.cloudflare.com/ajax/libs/processing.js/1.6.0/processing.min.js"></script>
45 <link rel="preconnect" href="https://fonts.googleapis.com">
46 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
47 <link href="https://fonts.googleapis.com/css2?family=Azeret+Mono:ital,wght@0,100..900;1,100..900&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap" rel="stylesheet">
48 <style type="text/tailwindcss">
49 @tailwind base;

podcastmain.tsx1 match

@all•Updated 7 months ago
17 },
18 {
19 personality1: "a venture capitalist",
20 personality2: "an architect",
21 topic:

retiredRedMarlinmain.tsx3 matches

@temptemp•Updated 7 months ago
14
15 // Fetch search results
16 const search = await fetch("https://api.anicrush.to/shared/v2/movie/list?keyword=One Piece&limit=10&page=1", {
17 headers,
18 });
22
23 // Fetch server data
24 const serverData = await fetch(`https://api.anicrush.to/shared/v2/episode/servers?_movieId=${id}&ep=1`, {
25 headers,
26 });
30 // Fetch server link
31 const serverLink = await fetch(
32 `https://api.anicrush.to/shared/v2/episode/sources?_movieId=${id}&ep=1&sv=${serverId}&sc=sub`,
33 { headers },
34 );

welcomingSapphireRoundwormmain.tsx8 matches

@stevekrouse•Updated 7 months ago
20
21 try {
22 // First API call - Get search results
23 const searchResult = await fetch("/api/search", {
24 method: "POST",
25 headers: { "Content-Type": "application/json" },
30 setSources(searchData.sources);
31
32 // Second API call - Get summary
33 setSummaryLoading(true);
34 const summaryResult = await fetch("/api/summarize", {
35 method: "POST",
36 headers: { "Content-Type": "application/json" },
121 const url = new URL(req.url);
122
123 if (url.pathname === "/api/search") {
124 const { query } = await req.json();
125
126 // Search using SerpApi
127 const searchResponse = await fetch(
128 `https://serpapi.com/search.json?q=${encodeURIComponent(query)}&api_key=${Deno.env.get("SERP_API_KEY")}`,
129 );
130
144 }
145
146 if (url.pathname === "/api/summarize") {
147 const { query, searchData } = await req.json();
148 const sources = searchData.sources;

cerebras_debaterREADME.md2 matches

@stevekrouse•Updated 7 months ago
6
71. Sign up for [Cerebras](https://cloud.cerebras.ai/)
82. Get a Cerebras API Key
93. Save it in a [Val Town environment variable](https://www.val.town/settings/environment-variables) called `CEREBRAS_API_KEY`
10
11Migrated from folder: Archive/cerebras_debater

what_did_i_work_on_todaymain.tsx11 matches

@danphilibin•Updated 7 months ago
7// ============================================================================
8
9// Demo mode - set to true to show mock data instead of making API requests
10const DEMO_MODE = true;
11
119 useEffect(() => {
120 Promise.all([
121 fetch("/api/prs").then(async (res) => {
122 if (!res.ok) {
123 const error = await res.json();
126 return res.json();
127 }),
128 fetch("/api/issues").then(async (res) => {
129 if (!res.ok) {
130 const error = await res.json();
138 })
139 .catch((err) => {
140 setErrors({ api: err.message });
141 })
142 .finally(() => {
146
147 if (loading) return <div>Loading...</div>;
148 if (errors.api) return <ErrorMessage message={errors.api} />;
149
150 return (
183 // Return mock data in demo mode
184 if (DEMO_MODE) {
185 if (url.pathname === "/api/prs") {
186 return new Response(JSON.stringify(MOCK_DATA.prs), { headers: JSON_HEADERS });
187 }
188 if (url.pathname === "/api/issues") {
189 return new Response(JSON.stringify(MOCK_DATA.issues), { headers: JSON_HEADERS });
190 }
191 }
192
193 if (url.pathname === "/api/prs") {
194 const githubToken = Deno.env.get(GITHUB.TOKEN_ENV_VAR);
195 if (!githubToken) {
200
201 const response = await fetch(
202 `https://api.github.com/search/issues?q=repo:${GITHUB.REPOSITORY}+author:${GITHUB.USERNAME}+created:>${timeAgo}+type:pr`,
203 {
204 headers: {
225 }
226
227 if (url.pathname === "/api/issues") {
228 const linearToken = Deno.env.get(LINEAR.TOKEN_ENV_VAR);
229 if (!linearToken) {
252 `;
253
254 const response = await fetch("https://api.linear.app/graphql", {
255 method: "POST",
256 headers: {

cerebras_searcherREADME.md8 matches

@stevekrouse•Updated 7 months ago
1# Cerebras Searcher
2
3a Perplexity clone that uses the SerpAPI to do RAG
4and summaries with Cerebras (*requires a SerpAPI key*)
5
6**This val might not be working because we're out of SerpAPI credits,
7but if you fork it and get your own SerpAPI key, it should work.** Comment on this
8val if you still have trouble, thanks!
9
11
121. Fork this val
132. Sign up for [Cerebras](https://cloud.cerebras.ai/) and get an API key
143. Save it in a [Val Town environment variable](https://www.val.town/settings/environment-variables) called `CEREBRAS_API_KEY`
154. Get a [SerpAPI](https://serpapi.com/) key (free trial available)
165. Set your SerpAPI API key into you [Val Town Environment Variables](https://www.val.town/settings/environment-variables)
176. Done!
18

dailyQuoteAPI

@Souky•Updated 21 hours ago

HTTP

@Ncharity•Updated 23 hours ago
Daily Quote API
Kapil01
apiv1