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=962&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 11604 results for "api"(1142ms)

getHolidaysmain.tsx1 match

@ptrUpdated 1 year ago
4 try {
5 return fetchJSON(
6 `https://date.nager.at/api/v2/publicholidays/${year}/${country}`
7 );
8 } catch (err) {

myApimain.tsx1 match

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

posthogStatusTrackermain.tsx4 matches

@ianvphUpdated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { set } from "https://esm.town/v/std/set?v=11";
3import { postHogAPICapture } from "https://esm.town/v/ianvph/postHogAPICapture";
4import { email } from "https://esm.town/v/ianvph/email";
5import { phProjectAPIKey } from "https://esm.town/v/ianvph/phProjectAPIKey";
6import { newestStatusGuid } from "https://esm.town/v/ianvph/newestStatusGuid";
7import { parseXML } from "https://esm.town/v/stevekrouse/parseXML?v=1";
26 };
27 const captureData = {
28 key: phProjectAPIKey,
29 event: "posthog status update",
30 properties: properties,
31 distinct_id: email,
32 };
33 postHogAPICapture(captureData);
34 await set("newestStatusGuid", newestEntry.guid);
35 return "posthog status update captured";

myApimain.tsx1 match

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

curveMinusServermain.tsx2 matches

@ralfwUpdated 1 year ago
1import { curveMinusOpenAPI } from "https://esm.town/v/ralfw/curveMinusOpenAPI";
2import { curveMinusManifest } from "https://esm.town/v/ralfw/curveMinusManifest";
3import { curveMinus } from "https://esm.town/v/ralfw/curveMinus";
12 });
13 app.get("/ai-plugin.json", (c) => c.text(curveMinusManifest));
14 app.get("/openapi.yaml", (c) => c.text(curveMinusOpenAPI));
15 return app.fetch(req);
16};

myApimain.tsx1 match

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

myApimain.tsx1 match

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

discordMessagesmain.tsx1 match

@stevekrouseUpdated 1 year ago
3export function discordMessages({ botToken, channelId }) {
4 return fetchJSON(
5 `https://discord.com/api/channels/${channelId}/messages`,
6 {
7 headers: {

hnSearchByDatemain.tsx1 match

@stevekrouseUpdated 1 year ago
2
3export let hnSearchByDate = (params) => fetchJSON(
4 `http://hn.algolia.com/api/v1/search_by_date?${new URLSearchParams(params)}`
5)
15 const llm = new ChatOpenAI({
16 modelName: "gpt-3.5-turbo",
17 openAIApiKey: process.env.openai,
18 temperature: 0,
19 });

new-val-api-21 file match

@shouserUpdated 11 hours ago
This is an example of using the API to create a val.

gptApiTemplate2 file matches

@charmaineUpdated 1 day ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration