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/$%7Bart_info.art.src%7D?q=api&page=956&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 12372 results for "api"(2309ms)

rawmain.tsx4 matches

@pomdtrUpdated 12 months ago
4
5async function createScreenshot(code: string) {
6 const apiUrl = "https://sourcecodeshots.com/api/image";
7 const resp = await fetch(apiUrl, {
8 method: "POST",
9 headers: {
39 }
40 }
41 const resp = await fetch(`https://api.val.town/v1/alias/${author}/${name}`, {
42 headers,
43 });
50 const version = url.searchParams.get("v");
51 const resp = await fetch(
52 `https://api.val.town/v1/vals/${val.id}/versions/${version}`,
53 { headers },
54 );

cors_proxyREADME.md1 match

@adrienjUpdated 12 months ago
1```
2curl 'https://taras-free_open_router.web.val.run/api/v1/chat/completions' \
3 -H 'accept: application/json' \
4 -H 'authorization: Bearer THIS_IS_OVERRIDEN_ON_SERVER' \

milligramCssmain.tsx1 match

@xkontiUpdated 12 months ago
9
10export const stylesheets = [
11 "https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic",
12 "https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css",
13 "https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.1/milligram.css",

memoryApiPolicymain.tsx10 matches

@xkontiUpdated 12 months ago
2import { markdownToHtml } from "https://esm.town/v/xkonti/markdownToHtml";
3
4export const getPolicy = (apiName: string, contactEmail: string, lastUpdated: string) => {
5 if (apiName == null || apiName === "") apiName = "Memory API";
6 if (contactEmail == null || contactEmail === "") throw new Error("Contact email must be specified");
7 if (lastUpdated == null || lastUpdated === "") throw new Error("The last updated date must be specified");
8 const body = markdownToHtml(
9 `# ${apiName} Privacy Policy
10Last Updated: ${lastUpdated}
11
12## 1. Introduction
13Welcome to ${apiName}. This privacy policy outlines our practices regarding the collection, use, and sharing of information through ${apiName}.
14
15## 2. Data Collection and Use
16${apiName} allows users to store, retrieve, list, and delete data. The data stored can be of any type as inputted by the user. We do not restrict or control the content of the data stored. ${apiName} serves as a public database accessible to anyone with an API key.
17
18## 3. User Restrictions
19${apiName} does not impose age or user restrictions. However, users are advised to consider the sensitivity of the information they share.
20
21## 4. Global Use
22Our API is accessible globally. Users from all regions can store and access data on ${apiName}.
23
24## 5. Data Management
25Given the nature of ${apiName}, there are no user accounts or user identification measures. The API operates like a public database where data can be added, viewed, and deleted by any user. Users should be aware that any data they input can be accessed, modified, or deleted by other users.
26
27## 6. Data Security
28${apiName} is protected by an API key; beyond this, there is no specific data security measure in place. Users should not store sensitive, personal, or confidential information using ${apiName}. We assume no responsibility for the security of the data stored.
29
30## 7. Third-Party Involvement
31The API code is run and data is stored by val.town. They act as a third-party service provider for ${apiName}.
32
33## 8. Changes to This Policy

companiesHousePublicDatamain.tsx4 matches

@aeatonUpdated 12 months ago
2 const url = new URL(req.url);
3 const path = url.searchParams.get("path");
4 const apiUrl = new URL(path, "https://api.company-information.service.gov.uk/");
5 const apiKey = Deno.env.get("companiesHouseApiKey");
6 const basicAuth = btoa(apiKey + ":");
7 const response = await fetch(apiUrl, {
8 headers: { Authorization: `Basic ${basicAuth}` },
9 });

pipedreammain.tsx2 matches

@stevekrouseUpdated 12 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=44";
2import { google } from "npm:googleapis";
3
4export async function getAccessToken(accountId: string, bearer = Deno.env.get("pipedream")) {
5 const response = await fetchJSON(
6 `https://api.pipedream.com/v1/accounts/${accountId}?include_credentials=1`,
7 { bearer },
8 );

pipedreamREADME.md3 matches

@stevekrouseUpdated 12 months ago
1# Pipedream helpers
2
3Pipedream offers an Accounts API to handle OAuth for you, automatically, and for free. [How to do it is covered in this guide](https://docs.val.town/integrations/google-sheets/#use-pipedreams-accounts-api).
4
5The helper functions below can make it easier to work with various Google API. For example, I used them like so to get all my free/busy times for this week from all my google calendars:
6
7```ts
37```
38
39In order for this to work you need to follow the instructions in [this guide](https://docs.val.town/integrations/google-sheets/#use-pipedreams-accounts-api) to save your pipedream API key into your [Val Town Environment Variables](/settings/environment-variables) under `pipedream`, then connect the google account you care about to Pipedream, and copy it's Pipedream "account id" into your val code. Let me know if you need any help by commenting on this val!
40
41Migrated from folder: Archive/pipedream

aqiREADME.md1 match

@yacosta738Updated 12 months ago
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12

gptApiSchemaBuildermain.tsx3 matches

@xkontiUpdated 12 months ago
6 return zodToJsonSchema(schema, {
7 name: "schema",
8 target: "openApi3",
9 }).definitions.schema;
10}
61}
62
63export function getOpenApiSpec(
64 url: string,
65 title: string,
69) {
70 return {
71 openapi: "3.1.0",
72 info: {
73 title,

homelessREADME.md2 matches

@cameronpakUpdated 12 months ago
5At [OurTechnology](https://ourtechnology.co), we create technology solutions to empower and equip those who serve the homeless. We have a large data set of available resources in the US to aid in helping those experiencing homelessness find local resources, community, and support.
6
7This private (_but public to read_) API is used in our [ChatGPT Assistant, Homeless Services](https://chatg.pt/homeless-help).
8
9## Why a [ChatGPT Assistant](https://chatg.pt/homeless-help)?
15- The data set has been compiled together over the years and will continue to be updated as new techniques and partnerships make that possible.
16- We use [Typesense](typesense.org), a search as a service tool, to provide lightning fast search results for homeless resources near you.
17- This endpoint is created with [Hono](hono.dev) and is an incredibly easy way to create an API.
18
19## Contact OurTechnology

social_data_api_project3 file matches

@tsuchi_yaUpdated 2 days ago

simple-scrabble-api1 file match

@bryUpdated 6 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