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 18640 results for "api"(2735ms)

Airtable315 words

https://docs.val.town/integrations/airtable/
airtable = new Airtable({ apiKey: Deno.env.get("airtable_pat"), baseId: "appXSrKDlwbAijRmD", tableName: "All content", }); // Sample data from: https://blog.airtable.com/database-vs-spreadsheet/ const results = await airtable.select(); console.log(results); Make sure to change: apiKey if you

Sections

Setup

airtable = new Airtable({ apiKey: Deno.env.get("airtable_pat"), baseId: "appXSrKDlwbAijRmD", tableName: "All content", }); // Sample data from: https://blog.airtable.com/database-vs-spreadsheet/ const results = await airtable.select(); console.log(results); Make sure to change: apiKey if you

Browserless434 words

https://docs.val.town/integrations/browserless/
as browserless. Make an API call to the /scrape API. Section titled “Make an API call to the /scrape API” Check the documentation for the /scrape API and form your

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. Section titled “Sign up to Browserless and grab your API Key” Copy your API Key from https://cloud.browserless.io/account/ and save it as

Make an API call to the /scrape API

an API call to the /scrape API. Section titled “Make an API call to the /scrape API” Check the documentation for the /scrape API and form your request. For example,

Authentication284 words

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

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

“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

API Token Lifecycles

API Token Lifecycles. Section titled “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

Google Sheets1356 words

https://docs.val.town/integrations/google-sheets/
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. Section titled “Use Pipedream’s

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

Accounts API. Section titled “Use 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

1. Sign up for Pipedream and retrieve your API key

Pipedream and retrieve your API key. Section titled “1. Sign up for Pipedream and retrieve your API key” Sign up for Pipedream and visit https://pipedream.com/settings/user. Find the API Key section

2. Add that key as a Val Town environment variable

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

your own Google Cloud service 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,

1. Create a Google Cloud service account

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. Section titled “b. Enable the Google Sheets API” Open the Google Sheets API page, then double check if the correct project is selected. Once

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

Overview103 words

https://docs.val.town/api/
Town’s REST API should not be confused with HTTP triggers, which allow you to create your own custom HTTP endpoints within vals. API Reference Interactive reference documentation for our API

Sections

Overview

Town’s REST API should not be confused with HTTP triggers, which allow you to create your own custom HTTP endpoints within vals. API Reference Interactive reference documentation for our API

Val Town Docs232 words

https://docs.val.town/
Store and retrieve any data OpenAI Use the OpenAI API Email Send emails API and SDK. Section titled “API and SDK” REST API Access Val Town programmatically JavaScript SDK Interact

Sections

Val Town Docs

this page. Val Town is a collaborative website to write and scale serverless JavaScript. Create APIs, crons, and store data – in your browser, deployed in miliseconds. What is a

Val Town Standard Library

and retrieve structured data Blob Storage Store and retrieve any data OpenAI Use the OpenAI API Email Send emails

API and SDK

API and SDK. Section titled “API and SDK” REST API Access Val Town programmatically JavaScript SDK Interact with Val Town from JavaScript

Web scraping439 words

https://docs.val.town/guides/web-scraping/
large language models, advanced image generation models, and previously, also open-source models.[11][12] API call to external services. Section titled “API call to external services” See the Hosted Puppeteer guide for

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. Section titled “API call to external services” See the Hosted Puppeteer guide for using Browserless. Also check out Browserbase examples: browserbase and browserbaseUtils.

Steel271 words

https://docs.val.town/integrations/steel/
started with Puppeteer is to get your Steel API key and remix this val. Remix this Steel Puppeteer val. Get your free Steel API key. Add it to your Environment

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. Since Val Town can’t

Quick start with Puppeteer

started with Puppeteer is to get your Steel API key and remix this val. Remix this Steel Puppeteer val. Get your free Steel API key. Add it to your Environment

Quick start with Playwright

this Steel Playwright val. Get your free Steel API key. Add it to your Environment Variables (via left sidebar of your val) as STEEL_API_KEY. Set TMPDIR to /tmp in your

JavaScript SDK427 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 fetch210 words

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

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);

steel_puppeteer_startermain.tsx7 matches

@hrev•Updated 2 hours ago
6import Steel, { type Session } from 'steel-sdk';
7
8// This is a placeholder function showing how you would call an AI API.
9// You would replace this with the actual Google AI SDK (`@google/generative-ai`).
10async function getTextFromImageWithGemini(filePath: string): Promise<string> {
14 // In a real scenario, you would:
15 // 1. Install the Google AI SDK: `npm install @google/generative-ai`
16 // 2. Initialize the Gemini client with your API key.
17 // 3. Read the image file from the filePath.
18 // 4. Convert it to a format the API accepts (like base64).
19 // 5. Send it to the model (e.g., 'gemini-1.5-flash').
20 // 6. Return the `model.generateContent()` response.
27
28async function main(): Promise<void> {
29 if (!process.env.STEEL_API_KEY) {
30 console.error("Fatal: STEEL_API_KEY environment variable is not set.");
31 process.exit(1);
32 }
36
37 try {
38 const client = new Steel({ steelAPIKey: process.env.STEEL_API_KEY });
39
40 console.log("Creating Steel session...");
43
44 browser = await puppeteer.connect({
45 browserWSEndpoint: `wss://connect.steel.dev?apiKey=${process.env.STEEL_API_KEY}&sessionId=${session.id}`,
46 });
47 console.log("Connected to browser via Puppeteer");
Plantfo

Plantfocache.ts1 match

@Llad•Updated 4 hours ago
109 } catch (error) {
110 console.error('Error caching plant:', error);
111 // Don't throw error - caching failure shouldn't break the API
112 }
113}

shippingAPI1 file match

@dynamic_silver•Updated 15 hours ago

Galacta3 file matches

@defunkt•Updated 1 day ago
Marvel Rivals GPT via tracker.gg API
Kapil01
apiv1