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=929&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 11605 results for "api"(2029ms)

7To use it on your own Val Town Blob Storage, [fork it](https://www.val.town/v/stevekrouse/blob_admin/fork) to your account.
8
9It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
10
11# TODO
7To use it on your own Val Town Blob Storage, [fork it](https://www.val.town/v/stevekrouse/blob_admin/fork) to your account.
8
9It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
10
11# TODO

twitterAlertmain.tsx2 matches

@buttondownUpdated 1 year ago
17}): Promise<TweetResult[]> {
18 const { data } = await twitterJSON({
19 url: `https://api.twitter.com/2/tweets/search/recent?query=${await searchParams(
20 {
21 query,
55 const results = await twitterSearch({
56 query,
57 bearerToken: Deno.env.get("TWITTER_API_KEY"),
58 });
59 console.log("Here!", results);

basicAuthmain.tsx1 match

@stevekrouseUpdated 1 year ago
19
20async function fetchUser(token: string): Promise<User> {
21 const resp = await fetch("https://api.val.town/v1/me", {
22 headers: {
23 Authorization: `Bearer ${token}`,

basicAuthREADME.md1 match

@stevekrouseUpdated 1 year ago
17```
18
19To authenticate, [paste an api token](https://www.val.town/settings/api) in the password prompt.
20
21Migrated from folder: Archive/basicAuth

setSFTidbytImagemain.tsx3 matches

@squarethecircleUpdated 1 year ago
6 key: string;
7}) {
8 const apiKey = process.env.sf_tidbyt_api_key;
9 const deviceId = process.env.sf_tidbyt_device_id;
10 const res = await fetch(
11 `https://api.tidbyt.com/v0/devices/${deviceId}/push`,
12 {
13 method: "POST",
14 headers: {
15 Authorization: `Bearer ${apiKey}`,
16 },
17 body: JSON.stringify({

untitled_amberBedbugmain.tsx1 match

@sreenandmUpdated 1 year ago
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();

gsheet_callREADME.md3 matches

@hiteshjoshiUpdated 1 year ago
1# gsheet_call
2Wrapper around Google Sheets API v4.
3
4## Parameters
6- sheet_id: Google Sheet ID
7- method: HTTP method to use
8- action: Full URL with `https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/` removed
9- data: HTTP request body
10
11## Requirements
12- a Google Cloud service account
13- the Google Sheets API v4 enabled in your Google Cloud project
14- the spreadsheet ID (provide it in the sheet_id parameter)
15

testmain.tsx1 match

@ccallaway93Updated 1 year ago
1export async function test() {
2 const { default: axios } = await import("npm:axios");
3 const url = "http://207.244.232.58:8011/api/login";
4 const message = "testing";
5 const loginInfo = {

gpt3Examplemain.tsx2 matches

@ktodazUpdated 1 year ago
2
3const gpt3Example = async () => {
4 const response = await fetch("https://api.openai.com/v1/completions", {
5 method: "POST",
6 headers: {
7 "Content-Type": "application/json",
8 "Authorization": "Bearer " + process.env.OPENAI_API_KEY, // Replace with your OpenAI API Key
9 },
10 body: JSON.stringify({

new-val-api-21 file match

@shouserUpdated 14 hours ago
This is an example of using the API to create a val.

gptApiTemplate2 file matches

@charmaineUpdated 1 day 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