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=2&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 4129 results for "api"(389ms)

Supabase561 words

https://docs.val.town/integrations/databases/supabase/
Get your API URL and service role key. Go to your project’s Settings via the sidebar. Inside API, scroll down and copy the Project URL, and then, inside Project API

Sections

3. Get your API URL and service role key

Get your API URL and service role key. Go to your project’s Settings via the sidebar. Inside API, scroll down and copy the Project URL, and then, inside Project API

Browserbase127 words

https://docs.val.town/integrations/browserbase/
to get your Steel API key and fork this val. Get your free Browserbase API key at https://www.browserbase.com/ Add it to your Val Town Environment Variables as BROWSERBASE_API_KEY. Fork this

Sections

Quick start

to get your Steel API key and fork this val. Get your free Browserbase API key at https://www.browserbase.com/ Add it to your Val Town Environment Variables as BROWSERBASE_API_KEY. Fork this

Weather129 words

https://docs.val.town/guides/weather/
require payment and API keys. If you need something free and you’re primarily interested in weather in the United States, you can check out the NOAA weather API. Also, OpenWeatherMap

Sections

Weather data sources

require payment and API keys. If you need something free and you’re primarily interested in weather in the United States, you can check out the NOAA weather API. Also, OpenWeatherMap

OpenAI300 words

https://docs.val.town/std/openai/
questions about this page. Use OpenAI’s chat completion API with std/openai. This integration enables access to OpenAI’s language models without needing to acquire API keys. For free Val Town users,

Sections

OpenAI

questions about this page. Use OpenAI’s chat completion API with std/openai. This integration enables access to OpenAI’s language models without needing to acquire API keys. For free Val Town users,

Limits

the limitation by using your own keys: Create your own API key on OpenAI’s website. Create an environment variable named OPENAI_API_KEY. Use the OpenAI client from npm:openai: ExampleRun in Val

Interop with Node, Deno, and Browsers722 words

https://docs.val.town/guides/interop/
- Vals use the ES Module Syntax. Caveats: While we support Web Platform APIs, we also support many APIs that aren’t available in web browsers. Unlike web browsers, Deno can

Sections

Deno

variables in your local environment. Private vals can be run by setting DENO_AUTH_TOKENS. Create an API token in Val Town, and then use it for the esm.town domain: Terminal window

Browsers

- Vals use the ES Module Syntax. Caveats: While we support Web Platform APIs, we also support many APIs that aren’t available in web browsers. Unlike web browsers, Deno can

Node.js

Node.js. Using Node.js with Vals directly relies on relatively new APIs in Node.js, specifically the support for HTTP and HTTPS imports. This requires you to run Node with a the

Node.js with dnt

a bit more setup than the other options, but if you’re using Deno and NPM APIs and have more complex code, it can be a great option. You’ll need to

Express402 words

https://docs.val.town/vals/express/
this page. Deprecated. New vals should use the Web API instead, which supports a wider range of inputs & outputs. The Express API allows to run a Val as an

Sections

Express

this page. Deprecated. New vals should use the Web API instead, which supports a wider range of inputs & outputs. The Express API allows to run a Val as an

handle-val.express.val.run

handle-val.express.val.run. The Express API can be called via GET or POST. You can access the JSON-parsed POST request body via req.body: @user/postWebhookRun in Val Town ↗ export let postWebhook =

Custom Status Codes

Custom Status Codes. Like any Express server, you can respond with custom headers, and custom status codes. ExampleRun in Val Town ↗ // Visit: https://api.val.town/v1/express/vtdocs.customStatusCode. export const customStatusCode = (

HTTP99 words

https://docs.val.town/vals/http/
text. Open in ChatGPT Ask questions about this page. HTTP vals let you expose an API or website from your val. They are built on the web-standard Request and Response

Sections

HTTP

text. Open in ChatGPT Ask questions about this page. HTTP vals let you expose an API or website from your val. They are built on the web-standard Request and Response

Push notifications107 words

https://docs.val.town/guides/push-notifications/
that would be as easy to use as console.email and might work via Web Push API, in the meantime we recommend ntfy.sh as an easy way to send yourself push

Sections

Push notifications

that would be as easy to use as console.email and might work via Web Push API, in the meantime we recommend ntfy.sh as an easy way to send yourself push

Overview116 words

https://docs.val.town/vals/
each with different triggers: Script Triggered manually HTTP Triggered by https requests. You can make APIs or websites Cron Triggered by a timer or cron expression Email Triggered by an

Sections

What is a val?

each with different triggers: Script Triggered manually HTTP Triggered by https requests. You can make APIs or websites Cron Triggered by a timer or cron expression Email Triggered by an

Get a Github user196 words

https://docs.val.town/integrations/github/get-a-github-user/
this page. For example, we can get a user without passing an authentication token. GitHub API endpoints have a cURL command that you can manually translate into a fetchJSON call

Sections

Get a Github user

this page. For example, we can get a user without passing an authentication token. GitHub API endpoints have a cURL command that you can manually translate into a fetchJSON call

CTGBreakerimage.tsx3 matches

@horsefacts•Updated 13 hours ago
75
76const loadEmoji = (code) => {
77 // const api = `https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${code.toLowerCase()}.svg`
78 const api = `https://cdn.jsdelivr.net/gh/shuding/fluentui-emoji-unicode/assets/${code.toLowerCase()}_color.svg`;
79 return fetch(api).then((r) => r.text());
80};
81

JimeluStevensgetWeather.ts5 matches

@luke_f•Updated 13 hours ago
23async function generateConciseWeatherSummary(weatherDay) {
24 try {
25 // Get API key from environment
26 const apiKey = Deno.env.get("ANTHROPIC_API_KEY");
27 if (!apiKey) {
28 console.error("Anthropic API key is not configured.");
29 return null;
30 }
31
32 // Initialize Anthropic client
33 const anthropic = new Anthropic({ apiKey });
34
35 const response = await anthropic.messages.create({

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)