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=4&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"(666ms)

Neon Postgres280 words

https://docs.val.town/integrations/databases/neon-postgres/
Open in ChatGPT Ask questions about this page. Neon provides a PostgreSQL database with an API accessible over HTTP and a JavaScript SDK. This lets you use a more conventional

Sections

Neon Postgres

Open in ChatGPT Ask questions about this page. Neon provides a PostgreSQL database with an API accessible over HTTP and a JavaScript SDK. This lets you use a more conventional

Stripe714 words

https://docs.val.town/integrations/stripe/
from "https://esm.town/v/stevekrouse/discordWebhook"; import Stripe from "npm:stripe"; const stripe = new Stripe( Deno.env.get("stripe_sk_customer_readonly") as string, { apiVersion: "2020-08-27", } ); function getStripeCustomer(customerId: string) { return stripe.customers.retrieve(customerId); } export let newStripeEvent =

Sections

Stripe Checkout

Val Town: https://val.town/v/std/stripeCheckoutQuickstart. // @ts-ignore. import { Stripe } from "npm:stripe"; const stripe = new Stripe(Deno.env.get("STRIPE_TEST_API_KEY")); export default async function (req: Request): Promise<Response> { const url = new URL(req.url); if

Example Val Town Stripe Webhook

from "https://esm.town/v/stevekrouse/discordWebhook"; import Stripe from "npm:stripe"; const stripe = new Stripe( Deno.env.get("stripe_sk_customer_readonly") as string, { apiVersion: "2020-08-27", } ); function getStripeCustomer(customerId: string) { return stripe.customers.retrieve(customerId); } export let newStripeEvent =

Airtable312 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

Upgrade Guide: Safer Val Scopes333 words

https://docs.val.town/troubleshooting/std-set-permission-error/
in ChatGPT Ask questions about this page. On Nov 1, 2024, we announced safer default API scopes for vals, which don’t include the val:write scope. Some users were not included

Sections

Upgrade Guide: Safer Val Scopes

in ChatGPT Ask questions about this page. On Nov 1, 2024, we announced safer default API scopes for vals, which don’t include the val:write scope. Some users were not included

CORS356 words

https://docs.val.town/troubleshooting/cors/
from any domain (*). Support common HTTP methods without additional configuration. Work with standard web APIs and frameworks. Handle preflight requests automatically. This default configuration is beneficial for development, allowing

Sections

Default CORS Configuration

from any domain (*). Support common HTTP methods without additional configuration. Work with standard web APIs and frameworks. Handle preflight requests automatically. This default configuration is beneficial for development, allowing

Email381 words

https://docs.val.town/std/email/
{ email } from "https://esm.town/v/std/email?v=13". console.log( await email({ text: "Hi", headers: { "X-Custom-Header": "xxx", }, }), ). This is also documented in our REST API, and supported in the SDK.

Sections

Headers

{ email } from "https://esm.town/v/std/email?v=13". console.log( await email({ text: "Hi", headers: { "X-Custom-Header": "xxx", }, }), ). This is also documented in our REST API, and supported in the SDK.

Permissions966 words

https://docs.val.town/reference/permissions/
doesn’t protect any data. It merely makes it impossible for anyone to trigger this public API endpoint without the password. The worst that could happen if this password leaks is

Sections

Custom Authentication

doesn’t protect any data. It merely makes it impossible for anyone to trigger this public API endpoint without the password. The worst that could happen if this password leaks is

Legacy Private Vals

Legacy Private Vals. Prior to February 12th, 2024, private HTTP vals required an API token to access their endpoints. The endpoint was only accessible to the val owner and wasn’t

Version Control465 words

https://docs.val.town/reference/version-control/
file: import { min } from "npm:lodash-es@4"; We highly recommend pinning imported modules because their APIs can change between versions and unexpectedly break your code. Lockfiles. When you save a

Sections

Versions of external imports

file: import { min } from "npm:lodash-es@4"; We highly recommend pinning imported modules because their APIs can change between versions and unexpectedly break your code.

Github user's stars (pagination)426 words

https://docs.val.town/integrations/github/github-users-stars-pagination/
"https://esm.town/v/stevekrouse/fetchJSON?v=41"; export const getGithubStars = async (username: string) => { const user = await fetchJSON( `https://api.github.com/users/${username}`, ); let totalStars = 0; // Paginate the max number of pages per request.

Sections

Github user's stars (pagination)

"https://esm.town/v/stevekrouse/fetchJSON?v=41"; export const getGithubStars = async (username: string) => { const user = await fetchJSON( `https://api.github.com/users/${username}`, ); let totalStars = 0; // Paginate the max number of pages per request.

Email yourself when you get a comment reaction!

emailGithubReactions = async () => { const username = "stevekrouse"; const events = await fetchJSON( `https://api.github.com/users/${username}/events?per_page=100`, { headers: { Authorization: `Bearer ${githubPatToken}`, }, }, ); const comments = events.filter((event) =>

Send messages to Slack247 words

https://docs.val.town/integrations/slack/send-messages-to-slack/
and send a request to it with a message payload. Create a Slack app. Visit https://api.slack.com/apps?new_app=1, create a new app From Scratch, and choose your App Name and your workspace.

Sections

Create a Slack app

Create a Slack app. Visit https://api.slack.com/apps?new_app=1, create a new app From Scratch, and choose your App Name and your workspace.

simple_moirkdown_blogmoi.md1 match

@dcm31•Updated 1 day ago
5date: "2025-04-26"
6url: "https://dcm31--45d1947422b711f0be5c569c3dd06744.web.val.run"
7imageUrl: "https://chatgpt.com/backend-api/public_content/enc/eyJpZCI6Im1fNjgwZDBjYzQxYTcwODE5MWFlZTZmNzhjZmJjNGVhNGQ6ZmlsZV8wMDAwMDAwMDU0MTg2MWY2YTRiOWMxOWE3NTA4Yjk5NCIsInRzIjoiNDg0OTEyIiwicCI6InB5aSIsInNpZyI6IjFhODc1NDE1ZjJkNmNlM2EwYjY4YjMzYmZhYTIwMDM2YmIzMWI5NjU2YWYzZTdkYmM2N2IxOWRmMzdlZjliYzIiLCJ2IjoiMCIsImdpem1vX2lkIjpudWxsfQ=="
8tags: ["markdown", "blog", "val-town", "template"]
9---
vtProjectSearch

vtProjectSearchmoi.md2 matches

@dcm31•Updated 1 day ago
2title: "Val Town Project Search"
3description: "A search engine for Val Town projects, vals, and users"
4imageUrl: "https://chatgpt.com/backend-api/public_content/enc/eyJpZCI6Im1fNjgwYzQyM2VmNTIwODE5MTkzOGNjY2Q1NTkxZmU0YjQ6ZmlsZV8wMDAwMDAwMGIwNGM2MjMwOGY5MTUwMjdlYjhiMDM3ZCIsInRzIjoiNDg0ODk4IiwicCI6InB5aSIsInNpZyI6ImQ5MjNjZGY4MTlkY2RmMTkwMzliM2E0NDY4N2RlYWNlZjNjNzQwYmE1ZGFlODg2NjNmMGU0ZWNmNjE0MzYwNzAiLCJ2IjoiMCIsImdpem1vX2lkIjpudWxsfQ=="
5url: "https://charliesusersearch.val.run/"
6author: "dcm31"
7tags: ["search", "val-town", "typescript", "api"]
8---
9

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)