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/$%7Bart_info.art.src%7D?q=api&page=1069&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 17382 results for "api"(2443ms)

catsplsworkscholarlyLimeSlug1 match

@charmaine•Updated 2 months ago
1export default async function(req: Request): Promise<Response> {
2 const response = await fetch("https://api.thecatapi.com/v1/images/search");
3 const [catData] = await response.json();
4 return Response.json({ url: catData.url });

asdfkjhh_catsscholarlyLimeSlug1 match

@charmaine•Updated 2 months ago
1export default async function(req: Request): Promise<Response> {
2 const response = await fetch("https://api.thecatapi.com/v1/images/search");
3 const [catData] = await response.json();
4 return Response.json({ url: catData.url });

cattsssscholarlyLimeSlug1 match

@charmaine•Updated 2 months ago
1export default async function(req: Request): Promise<Response> {
2 const response = await fetch("https://api.thecatapi.com/v1/images/search");
3 const [catData] = await response.json();
4 return Response.json({ url: catData.url });

newCatsEveryTimescholarlyLimeSlug1 match

@charmaine•Updated 2 months ago
1export default async function(req: Request): Promise<Response> {
2 const response = await fetch("https://api.thecatapi.com/v1/images/search");
3 const [catData] = await response.json();
4 return Response.json({ url: catData.url });

jxnReactStream7 matches

@charmaine•Updated 2 months ago
34 const useMiddleware = Array.isArray(opts); // for backwards compat
35 const options: ReactStreamOptions = !Array.isArray(opts) ? opts : {};
36 const { api, getInitialProps } = options;
37
38 if (typeof document !== "undefined" && module) {
48 // DEPRECATED (for backwards compat)
49 options.robots && robots(options.robots),
50 options.api && deprecatedCustomAPI(options.api),
51 options.getInitialProps && deprecatedGetInitiaProps(options.getInitialProps),
52 // New custom middleware
127// DEPRECATED
128// DEPRECATE (for backwards compat)
129const deprecatedCustomAPI = (api?: RequestHandler): Middleware => async (req, res, next) => {
130 if (!api) return next();
131 if (req.method === "GET") return next();
132 return api(req);
133};
134const deprecatedGetInitiaProps = (getProps: DataFetcher<any>): Middleware => async (req, res, next) => {
142 /** DEPRECATED: Optional text response for robots.txt */
143 robots?: string;
144 /** DEPRECATED: Optional API request handler for all non-GET methods */
145 api?: RequestHandler;
146 /** DEPRECATED: data fetcher to set initial props based on request */
147 getInitialProps?: DataFetcher<any>;

jxnrss1 match

@charmaine•Updated 2 months ago
1// RSS middleware for jxnblk.com
2
3// import data from "https://blog.jxnblk.com/api/all.json" with { type: "json" };
4import type { Middleware } from "https://esm.town/v/jxnblk/ReactStream";
5

jxndotcom1 match

@charmaine•Updated 2 months ago
11import { rss } from "./rss";
12
13import data from "https://blog.jxnblk.com/api/all.json?d4" with { type: "json" };
14
15interface Params {

val_to_project_converter_clonestyle.css1 match

@charmaine•Updated 2 months ago
1@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=JetBrains+Mono:wght@400;500&display=swap");
2
3:root {

fetch_templatemain.tsx1 match

@gwoods22•Updated 2 months ago
20 if (resp.status !== 200) {
21 console.log("Response status:", resp.status);
22 await sendNotification("😵 "+ siteName +" scraping token died 😵", "Shucks");
23 throw new Error(await resp.text());
24 }

val_to_project_converter_cloneindex.html2 matches

@charmaine•Updated 2 months ago
8 content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
9 >
10 <link rel="preconnect" href="https://fonts.googleapis.com">
11 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
12 <link
13 href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=JetBrains+Mono:wght@400;500&display=swap"
14 rel="stylesheet"
15 >

RandomQuoteAPI

@Freelzy•Updated 4 hours ago

HAPI7 file matches

@dIgitalfulus•Updated 9 hours ago
Kapil01
apiv1