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=1&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 4126 results for "api"(238ms)

Browserless402 words

https://docs.val.town/integrations/browserless/
grab your API Key. Copy your API Key from https://cloud.browserless.io/account/ and save it as a Val Town environment variable as browserless. Make an API call to the /scrape API. Check

Sections

Browserless

to search the final document. Services like Browserless provide APIs to interact with a hosted headless browser. For example, their /scrape API. Here’s how to use Browserless and Val Town

Sign up to Browserless and grab your API Key

Sign up to Browserless and grab your API Key. Copy your API Key from https://cloud.browserless.io/account/ and save it as a Val Town environment variable as browserless.

Make an API call to the /scrape API

an API call to the /scrape API. Check the documentation for the /scrape API and form your request. For example, here’s how you scrape the introduction paragraph of OpenAI’s wikipedia

Authentication276 words

https://docs.val.town/api/authentication/
when doing so. Be sure to audit all your dependencies recursively for such vals. API Token Lifecycles. API Tokens come with configurable expiration dates. We strongly recommend setting expiration dates

Sections

Authentication

Val Town’s REST API supports Bearer Token authentication. You can create and manage your API tokens on the API Tokens page. If you’re using the Val Town API from within

Scopes

Val Town API tokens are scoped to read/write scopes for: val – vals. user – user account details. blob – blob storage. sqlite – sqlite database. email – ability to

API Token Lifecycles

API Token Lifecycles. API Tokens come with configurable expiration dates. We strongly recommend setting expiration dates for your tokens and rotating them regularly. If you accidentally leak or misplace an

Google Sheets1211 words

https://docs.val.town/integrations/google-sheets/
the Google Sheets API: Use Pipedream’s Accounts API to fetch a fresh OAuth access token at runtime. Use your own Google Cloud service account. Use Pipedream’s Accounts API. Pipedream provides

Sections

Google Sheets

on a schedule. You have two options for authenticating with the Google Sheets API: Use Pipedream’s Accounts API to fetch a fresh OAuth access token at runtime. Use your own

Use Pipedream’s Accounts API

Pipedream’s Accounts API. Pipedream provides a workflow automation product for developers. Workflows are built as a sequence of steps — pre-built actions for thousands of APIs or custom code —

1. Sign up for Pipedream and retrieve your API key

your API key. Sign up for Pipedream and visit https://pipedream.com/settings/user. Find the API Key section and copy your key: You’ll use this key to authenticate requests to the Accounts API,

2. Add that key as a Val Town environment variable

2. Add that key as a Val Town environment variable. Add the API key as an environment variable in Val Town. In this example, we’ve named the environment variable pipedream_api_key:

6. Fetch a Google Sheets access token and use it in your val

baseURL = `https://sheets.googleapis.com/v4/spreadsheets/${sheetID}/values`; async function fetchAccessToken() { const response = await fetch( `https://api.pipedream.com/v1/accounts/${accountID}?include_credentials=1`, { headers: { Authorization: `Bearer ${Deno.env.get("pipedream_api_key")}`, }, }, ); if (!response.ok) { throw new Error(`Error fetching access

Use your own Google Cloud service account

account. Authenticating with the Google Sheets API is a bit tricky, but we walk you through it below. It should only take a few minutes, and only needs to be

1. Create a Google Cloud service account

1. Create a Google Cloud service account. Creating a Google Cloud service account is the recommended way to authenticate to the Google Sheets API.

b. Enable the Google Sheets API

b. Enable the Google Sheets API. Open the Google Sheets API page, then double check if the correct project is selected. Once you have made sure that you are using

3. Create a val to send data

To interact with the Google Sheets API, use the @mattx.gsheet_call wrapper. This automates requesting an access token from Google to access the Google Sheets API. It requires 4 arguments: The

Overview104 words

https://docs.val.town/api/
REST API should not be confused with HTTP vals, which are a way for you to create your own custom HTTP endpoints. API Reference Interactive reference documentation for our API

Sections

Overview

REST API should not be confused with HTTP vals, which are a way for you to create your own custom HTTP endpoints. API Reference Interactive reference documentation for our API

Val Town Docs211 words

https://docs.val.town/
Use the OpenAI API Email Send emails Proxied Fetch Make requests from anonymous IP addresses API and SDK. You can access Val Town programmatically via our REST API or JavaScript

Sections

Val Town Docs

this page. Val Town is a collaborative website to create and scale JavaScript functions. Create APIs, crons, store data – all from the browser, and deployed in miliseconds. What is

Val Town Standard Library

Val Town Standard Library. Our standard library provides free hosted services. SQLite Store and retrieve structured data Blob Storage Store and retrieve any data OpenAI Use the OpenAI API Email

API and SDK

API and SDK. You can access Val Town programmatically via our REST API or JavaScript SDK.

Steel118 words

https://docs.val.town/integrations/steel/
to get your Steel API key and fork this val. Get your free Steel API key at https://app.steel.dev/settings/api-keys. Add it to your Val Town Environment Variables as STEEL_API_KEY. Fork this

Sections

Steel

plain text. Open in ChatGPT Ask questions about this page. Steel is an open-source browser API that lets you control fleets of browsers in the cloud.

Quick start

to get your Steel API key and fork this val. Get your free Steel API key at https://app.steel.dev/settings/api-keys. Add it to your Val Town Environment Variables as STEEL_API_KEY. Fork this

Web scraping416 words

https://docs.val.town/guides/web-scraping/
has developed several large language models, advanced image generation models, and previously, also open-source models.[11][12] API call to external services. See the Hosted Puppeteer guide for using Browserless. Also check

Sections

Web scraping

scrape websites, either by fetching HTML and using a parsing library, or by making an API call to an external service that runs a headless browser for you.

Parsing HTML

This makes it a good fit for cheerio which parses HTML markup and provides an API for traversing/manipulating the resulting data structure. We also recommend node-html-parser and linkedom. ExampleRun in

API call to external services

API call to external services. See the Hosted Puppeteer guide for using Browserless. Also check out Browserbase examples: browserbase and browserbaseUtils.

JavaScript SDK414 words

https://docs.val.town/api/sdk/
authenticated with an API token, so create an API token on Val Town, and set it in your terminal environment: Setting your Val Town API Token export VAL_TOWN_API_KEY=your api token…

Sections

JavaScript SDK

questions about this page. The Val Town TypeScript SDK lets you interact with our REST API from the comfort of a typed client that works well with editor autocomplete. Reference

Getting started in Val Town

await vt.me.likes.list({}); console.log(likes); Authentication is set by the VAL_TOWN_API_KEY environment variable, which is automatically set within Val Town. You can control the API scopes of that key in your val’s

Getting started in Node.js

authenticated with an API token, so create an API token on Val Town, and set it in your terminal environment: Setting your Val Town API Token export VAL_TOWN_API_KEY=your api token…

Proxied fetch207 words

https://docs.val.town/std/fetch/
calling the Javascript Fetch API due to extra network hops. Usage. After importing std/fetch, the fetch method is used with the same signature as the Javascript Fetch API. ExampleRun in

Sections

Proxied fetch

page as plain text. Open in ChatGPT Ask questions about this page. The Javascript Fetch API is directly available within a Val. However sometimes fetch calls are blocked by the

Usage

the same signature as the Javascript Fetch API. ExampleRun in Val Town ↗ import { fetch } from "https://esm.town/v/std/fetch"; let result = await fetch("https://api64.ipify.org?format=json"); let json = await result.json(); console.log(json.ip);

Blob Storage366 words

https://docs.val.town/std/blob/
await blob.copy("myKey", "myKeyCopy"); Move. Move import { blob } from "https://esm.town/v/std/blob"; await blob.move("myKey", "myKeyNew"); Lower-level API. We provide access to the lower-level getter and setters, which are useful if you

Sections

Lower-level API

Lower-level API. We provide access to the lower-level getter and setters, which are useful if you are storing non-JSON or binary data, need to stream in your response or request

JimeluStevenssendDailyBrief.ts8 matches

@luke_f•Updated 1 hour ago
91
92export async function sendDailyBriefing(chatId?: string, today?: DateTime) {
93 // Get API keys from environment
94 const apiKey = Deno.env.get("ANTHROPIC_API_KEY");
95 const telegramToken = Deno.env.get("TELEGRAM_TOKEN");
96
100 }
101
102 if (!apiKey) {
103 console.error("Anthropic API key is not configured.");
104 return;
105 }
116
117 // Initialize Anthropic client
118 const anthropic = new Anthropic({ apiKey });
119
120 // Initialize Telegram bot
156
157 // disabled title for now, it seemes unnecessary...
158 // await bot.api.sendMessage(chatId, `*${title}*`, { parse_mode: "Markdown" });
159
160 // Then send the main content
163
164 if (content.length <= MAX_LENGTH) {
165 await bot.api.sendMessage(chatId, content, { parse_mode: "Markdown" });
166 // Store the briefing in chat history
167 await storeChatMessage(
192 // Send each chunk as a separate message and store in chat history
193 for (const chunk of chunks) {
194 await bot.api.sendMessage(chatId, chunk, { parse_mode: "Markdown" });
195 // Store each chunk in chat history
196 await storeChatMessage(

JimeluStevenshandleUSPSEmail.ts5 matches

@luke_f•Updated 1 hour ago
86 console.log(e.text);
87
88 // Get Anthropic API key from environment
89 const apiKey = Deno.env.get("ANTHROPIC_API_KEY");
90 if (!apiKey) {
91 console.error("Anthropic API key is not configured for this val.");
92 return;
93 }
94
95 // Initialize Anthropic client
96 const anthropic = new Anthropic({ apiKey });
97
98 // Process each image attachment serially

openapi2 file matches

@stevekrouse•Updated 1 day ago

dbToAPI_backup4 file matches

@nbbaier•Updated 3 days ago
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com
fiberplane
Purveyors of Hono tooling, API Playground enthusiasts, and creators of 🪿 HONC 🪿 (https://honc.dev)