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=920&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 12813 results for "api"(1656ms)

slackScoutREADME.md4 matches

@fahadakhan2Updated 8 months ago
7## Getting Started
8To run Slack Scout, you’ll need a
9- Browserbase API key
10- Slack Webhook URL: setup [here](https://docs.val.town/integrations/slack/send-messages-to-slack/)
11- Twitter Developer API key
12
13### Browserbase
19### Twitter
20
21We’ve decided to use the Twitter API to include Twitter post results. It costs $100 / month to have a Basic Twitter Developer account. _If you decide to use Browserbase, we can lend our token. Comment below for access._
22
23Once you have the `SLACK_WEBHOOK_URL`, `BROWSERBASE_API_KEY`, and `TWITTER_BEARER_TOKEN`, input all of these as [Val Town Environment Variables](https://www.val.town/settings/environment-variables).
24
25---

setTidbytImagemain.tsx6 matches

@andreterronUpdated 8 months ago
3
4const devices = [
5 { apiKey: Deno.env.get("tidbyt_apikey"), id: Deno.env.get("tidbyt_device_id") },
6 { apiKey: Deno.env.get("tidbyt_2_api_key"), id: Deno.env.get("tidbyt_2_device_id") },
7];
8
10 image: string;
11}) {
12 const apiKey = Deno.env.get("tidbyt_apikey");
13 for (let { apiKey, id } of devices) {
14 const res = await fetch(
15 `https://api.tidbyt.com/v0/devices/${id}/push`,
16 {
17 method: "POST",
18 headers: {
19 Authorization: `Bearer ${apiKey}`,
20 },
21 body: JSON.stringify({

restfulJsonBlobApimain.tsx9 matches

@anotherjesseUpdated 8 months ago
1// This val creates a RESTful API for storing JSON blobs using Val Town's blob storage.
2// It supports GET, POST, PUT, and DELETE operations on /items and /items/:id endpoints.
3// CORS is enabled to allow requests from any origin.
4// The root endpoint (/) returns instructions on how to use the API via curl.
5
6import { blob } from "https://esm.town/v/std/blob";
100function getInstructions() {
101 return `
102JSON Blob Storage API
103
104This API allows you to store, retrieve, update, and delete JSON blobs.
105
106Endpoints:
108GET /items
109 Retrieve all items
110 curl https://anotherjesse-restfuljsonblobapi.web.val.run/items
111
112GET /items/:id
113 Retrieve a specific item
114 curl https://anotherjesse-restfuljsonblobapi.web.val.run/items/[id]
115
116POST /items
117 Create a new item
118 curl -X POST https://anotherjesse-restfuljsonblobapi.web.val.run/items -H "Content-Type: application/json" -d '{"key": "value"}'
119
120PUT /items/:id
121 Update an existing item
122 curl -X PUT https://anotherjesse-restfuljsonblobapi.web.val.run/items/[id] -H "Content-Type: application/json" -d '{"key": "new value"}'
123
124DELETE /items/:id
125 Delete an item
126 curl -X DELETE https://anotherjesse-restfuljsonblobapi.web.val.run/items/[id]
127
128Replace [id] with the actual ID of the item you want to interact with.

blob_adminREADME.md1 match

@ryiUpdated 8 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

telegramDalleBotmain.tsx1 match

@adjacentUpdated 8 months ago
9) => {
10 if (
11 req.get("x-telegram-bot-api-secret-token")
12 !== process.env.telegramDalleBotWebhookSecret
13 ) {

searchManifoldMarketsmain.tsx1 match

@adjacentUpdated 8 months ago
7export async function searchManifoldMarkets(query: string) {
8 const result = await fetch(
9 `https://manifold.markets/api/v0/search-markets?${query}`,
10 );
11 const markets = await result.json() as Market[];

rabbitstreammain.tsx1 match

@tempdevUpdated 8 months ago
16 const { provider, id } = c.req.param();
17 if (!["rabbit", "mega"].includes(provider)) {
18 return c.json({ error: "Invalid API request" }, 500);
19 }
20 // const cache = await blob.getJSON(id);

WundergroundStationDisplayV2main.tsx5 matches

@CroniacUpdated 8 months ago
1// This approach will fetch weather data from a Wunderground API, parse the JSON response,
2// and display a simplified version of the current conditions in separate tiles. We'll use
3// the fetch API to make the HTTP request and React for rendering the UI.
4
5/** @jsxImportSource https://esm.sh/react */
29 const fetchWeather = () => {
30 setLastChecked(new Date());
31 fetch("/api/weather" + window.location.search)
32 .then(response => response.json())
33 .then(data => {
181 }
182
183 if (url.pathname === "/api/weather") {
184 try {
185 const wundergroundResponse = await fetch(
186 `https://api.weather.com/v2/pws/observations/current?stationId=${stationId}&format=json&units=e&apiKey=e1f10a1e78da46f5b10a1e78da96f525`,
187 );
188 const wundergroundData = await wundergroundResponse.json();

jsonToDalleFormmain.tsx2 matches

@weaverwhaleUpdated 8 months ago
141 // Initialize OpenAI here to avoid issues with Deno.env in browser context
142 if (!openai) {
143 const apiKey = Deno.env.get("OPENAI_API_KEY");
144 openai = new OpenAI({ apiKey });
145 }
146

hackerNewsDigestmain.tsx1 match

@yasarcelepUpdated 8 months ago
1// This cron emails Hacker News stories from its API every 3 days.
2
3import { email } from "https://esm.town/v/std/email";

vapi-minutes-db1 file match

@henrywilliamsUpdated 1 day ago

vapi-minutes-db2 file matches

@henrywilliamsUpdated 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