3
4
5There's nothing I like more than a little open data and transparency! This Val shows you how to use the [California Secretary of State Business Search](https://bizfileonline.sos.ca.gov/search/business) as a faux-API and get notifications when records change. This lets you know when a business updates their records, changes their good-standing status, and so on.
6
7Here's how to use it:
135. Now, in the network tab of your developer tools, you should see a request that ends with `false`. You'll find a number in that URL. Plug that number into the val at the spot at the top.
14
15
16
17(We're almost there!)
27### Notes
28
29- [opencorporates](https://opencorporates.com/) has a _way_ better system for open data around businesses, but to get a free API key you need to be a nonprofit or a registered journalist, and I am neither. But if you are, use that!
30- Thanks to America's laws around business registration, it's commonplace for businesses to mask their control and ownership by using registration agents and a few layers of corporate structure.
1Migrated from folder: External_APIs/openai/openaiFineTuneData
1null
2
3Migrated from folder: External_APIs/openai/fineTuningJob1
1Migrated from folder: External_APIs/openai/openaiFineTune
1Migrated from folder: External_APIs/openai/openaiUploadFile
14
15* This is very inefficient. It refetches and re-parses blog.val.town on every single request, modulo some caching via the headers. It would be much more efficient to cache the results of fetching and parsing the Val Town blog, and then only re-fetch it every 10 minutes or so.
16* Instead of fetching and parsing HTML from super.so, we could get this same data from Notion's API, with a val like @stevekrouse.notionGetDatabase.
17
18Migrated from folder: Archive/blogRSS
57You can attach files to your emails by using the `attachments` field.
58Attachments need to be [Base64](https://en.wikipedia.org/wiki/Base64) encoded,
59which is what the [btoa](https://developer.mozilla.org/en-US/docs/Web/API/btoa)
60method is doing in this example:
61
94```
95
96This is also [documented in our REST API](https://docs.val.town/openapi#/tag/emails/POST/v1/email), and supported in the [SDK](https://docs.val.town/api/sdk/).
97
98
1# Human Alive-ness API
2
3It works by querying Wikidata via SPARQL to search for birth and death dates of a person.
17## Learn more
18
19* https://agg-shashank.medium.com/an-introduction-to-using-wikidata-apis-a678ee6d2968
20
21Migrated from folder: Archive/wikidata
1# Requesting data from the OpenStreetMap API
2
3The [OpenStreetMap API](https://wiki.openstreetmap.org/wiki/API_v0.6) allows both unauthenticated public reads and writes using authentication tokens. This example shows us getting the first node ever created in the project, which was last edited by [owene](https://www.openstreetmap.org/user/owene).