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/$%7Bsuccess?q=api&page=941&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 13036 results for "api"(2203ms)

add_to_notion_w_aiREADME.md1 match

@eyeseethruUpdated 8 months ago
14Supports: checkbox, date, multi_select, number, rich_text, select, status, title, url, email
15
16- Uses `NOTION_API_KEY`, `OPENAI_API_KEY` stored in env variables and uses [Valtown blob storage](https://esm.town/v/std/blob) to store information about the database.
17- Use `get_notion_db_info` to use the stored blob if exists or create one, use `get_and_save_notion_db_info` to create a new blob (and replace an existing one if exists).

add_to_notion_w_aimain.tsx3 matches

@eyeseethruUpdated 8 months ago
6import { z } from "npm:zod";
7
8const NOTION_API_KEY = process.env.NOTION_API_KEY;
9const notion = new Client({
10 auth: NOTION_API_KEY,
11});
12
27
28const oai = new OpenAI({
29 apiKey: process.env.OPENAI_API_KEY ?? undefined,
30});
31

eagerIndigoPigREADME.md4 matches

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

eagerIndigoPigmain.tsx3 matches

@nickaggarwalUpdated 8 months ago
54 query: topic,
55 pages: 2,
56 apiKey: Deno.env.get("BROWSERBASE_API_KEY") ?? "",
57 });
58}
63 maxResults: 10,
64 daysBack: 1,
65 apiKey: Deno.env.get("TWITTER_BEARER_TOKEN") ?? "",
66 });
67}
98
99 if (!response.ok) {
100 throw new Error(`Slack API error: ${response.status} ${response.statusText}`);
101 }
102

slackScoutREADME.md4 matches

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

slackScoutmain.tsx3 matches

@nickaggarwalUpdated 8 months ago
54 query: topic,
55 pages: 2,
56 apiKey: Deno.env.get("BROWSERBASE_API_KEY") ?? "",
57 });
58}
63 maxResults: 10,
64 daysBack: 1,
65 apiKey: Deno.env.get("TWITTER_BEARER_TOKEN") ?? "",
66 });
67}
98
99 if (!response.ok) {
100 throw new Error(`Slack API error: ${response.status} ${response.statusText}`);
101 }
102

ForexDataHubmain.tsx3 matches

@samweistUpdated 8 months ago
44 const url = new URL(request.url);
45
46 if (url.pathname === "/api/calendar") {
47 const currentDate = new Date("2024-09-14");
48 const futureEvents = generateFutureEvents().map(event => ({
97 }
98
99 // ... (keep other API endpoints)
100
101 // HTML pages
103 let calendarEvents;
104 try {
105 const response = await fetch(new URL("/api/calendar", request.url));
106 calendarEvents = await response.json();
107 if (!Array.isArray(calendarEvents)) {

memoryApiExamplemain.tsx7 matches

@xkontiUpdated 8 months ago
1import { handleMemoryApiRequest } from "https://esm.town/v/xkonti/gptMemoryManager";
2
3export const memoryApiExample = async (req: Request) => {
4 const apiName = "Memory API";
5 const contactEmail = "some@email.com";
6 const lastPolicyUpdate = "2023-11-28";
7 const blobKeyPrefix = "gpt:memories:";
8 const apiKeyPrefix = "GPTMEMORYAPI_KEY_";
9
10 return await handleMemoryApiRequest(
11 req,
12 apiName,
13 contactEmail,
14 lastPolicyUpdate,
15 blobKeyPrefix,
16 apiKeyPrefix,
17 );
18};

FanficSearcherWebsitemain.tsx9 matches

@willthereaderUpdated 8 months ago
2import { configure, hits, pagination, searchBox } from "https://esm.sh/instantsearch.js@4.49.1/es/widgets";
3// first stable version is 9 and the link is https://www.val.town/v/willthereader/FanficSearcherWebsite?v=9
4function validateConfig(): { appId: string; apiKey: string } {
5 const appId = Deno.env.get("ALGOLIA_APP_ID_fanficSearcher");
6 const apiKey = Deno.env.get("ALGOLIA_SEARCH_API_KEY_fanficSearcher");
7
8 if (!appId || !apiKey) {
9 throw new Error("Algolia credentials are not properly set");
10 }
11
12 return { appId, apiKey };
13}
14
15function generateHtml(appId: string, apiKey: string): string {
16 console.log("Generating HTML with App ID:", appId, "and API Key:", apiKey ? "exists" : "missing");
17 return `
18<!DOCTYPE html>
67 <script>
68 console.log("Initializing Algolia search with App ID:", "${appId}");
69 const searchClient = algoliasearch("${appId}", "${apiKey}");
70
71 const search = instantsearch({
123 console.log("Received request:", request.url);
124 try {
125 const { appId, apiKey } = validateConfig();
126 const html = generateHtml(appId, apiKey);
127 console.log("Generated HTML, length:", html.length);
128 return new Response(html, {

alchemyClientmain.tsx3 matches

@jamiedubsUpdated 8 months ago
5
6export async function alchemyFetch(path: string, tokens: TokenParam = "erc20") {
7 const apiKey = process.env.ALCHEMY_API_KEY;
8 if (!apiKey) throw new Error("missing ALCHEMY_API_KEY");
9 const baseUrl = tokens == "nft" ? "https://eth-mainnet.g.alchemy.com/nft/v2" : "https://eth-mainnet.g.alchemy.com/v2";
10 const rpcUrl = `${baseUrl}/${apiKey}`;
11 const url = `${rpcUrl}/${path}`;
12 const response = await fetch(url, {

vapi-minutes-db1 file match

@henrywilliamsUpdated 2 days ago

vapi-minutes-db2 file matches

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