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?q=api&page=1067&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 11661 results for "api"(4834ms)

myApimain.tsx1 match

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

qq_svgmain.tsx2 matches

@envl•Updated 1 year ago
17 // stars for user
18 if (!repo) {
19 stars = await fetch(`https://api.github.com/users/${user}/repos`)
20 .then((r) => r.json())
21 .then((d) =>
26 else {
27 const res = await fetch(
28 `https://api.github.com/search/repositories?q=${user}/${repo}`,
29 );
30 const data = await res.json();

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

expressApiTestmain.tsx1 match

@z233•Updated 1 year ago
1export function expressApiTest(req: express.Request, res: express.Response) {
2 function listAllMembers(obj) {
3 const members = new Set();

bebopBotWebhookmain.tsx1 match

@z233•Updated 1 year ago
11) {
12 const requestSecretToken =
13 req?.options?.headers?.["x-telegram-bot-api-secret-token"];
14 if (requestSecretToken !== bebopBotSecretToken) {
15 res.status(403).send("Access denied");

figmaTest1226main.tsx1 match

@rodrigotello•Updated 1 year ago
4
5export let figmaTest1226 = FigmaFileObject(
6 process.env.myFigmaAPIToken,
7 GetFigmaFileKey(
8 "https://www.figma.com/file/XqiternEMTE2Gk8jHzG4Ui/AvatarMixerFileTest?type=design&node-id=0%3A1&mode=design&t=Mpjs48FGMgw77SXW-1",

myApimain.tsx1 match

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

getRandomArticleInCategorymain.tsx2 matches

@fab1an•Updated 1 year ago
12 const encodedCategory = encodeURIComponent(category.replace(/ /g, "_"));
13 const listUrl =
14 `https://en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:${encodedCategory}&cmlimit=500&format=json&origin=*`;
15 const listResponse = await fetch(listUrl);
16 const listData = await listResponse.json();
25 ].title;
26 const contentUrl =
27 `https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro&titles=${
28 encodeURIComponent(randomArticle)
29 }&format=json&utf8=1&origin=*`;

new-val-api-21 file match

@shouser•Updated 20 hours ago
This is an example of using the API to create a val.

gptApiTemplate2 file matches

@charmaine•Updated 2 days ago
mux
Your friendly, neighborhood video API.
api