> ## Documentation Index
> Fetch the complete documentation index at: https://www.anything.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SFMTA

> Access San Francisco transit data

SFMTA (San Francisco Municipal Transportation Agency) API provides access to real-time transit data, schedules, and route information for San Francisco's public transportation system.

## Overview

<CardGroup cols={2}>
  <Card title="Create Account" icon="user">
    Sign up for an SFMTA developer account
  </Card>

  <Card title="Get API Key" icon="key">
    Generate your SFMTA API key
  </Card>

  <Card title="Copy into Anything" icon="plug">
    Add your API key to Anything's secrets
  </Card>
</CardGroup>

## Account Creation

<Steps>
  <Step title="Visit SFMTA Developer Portal">
    Go to [https://511.org/open-data](https://511.org/open-data) and click "Request a Token"

    <img src="https://mintcdn.com/create/-FyrzxgKR6I2JC9B/images/sfmta/homepage.png?fit=max&auto=format&n=-FyrzxgKR6I2JC9B&q=85&s=f8e4ad5a7db105304396d1c96d5f59ab" style={{ borderRadius: '0.5rem', width: '624px', height: '303px' }} width="3420" height="1962" data-path="images/sfmta/homepage.png" />
  </Step>

  <Step title="Register for an Account">
    * Fill in your developer information
    * Describe your intended API usage
    * Complete the verification process

    <img src="https://mintcdn.com/create/-FyrzxgKR6I2JC9B/images/sfmta/apigen.png?fit=max&auto=format&n=-FyrzxgKR6I2JC9B&q=85&s=6a32df19396df87c7702307f9c4ba8bb" style={{ borderRadius: '0.5rem', width: '624px', height: '303px' }} width="2976" height="1748" data-path="images/sfmta/apigen.png" />
  </Step>
</Steps>

## Generate API Key

<Steps>
  <Step title="Copy Your API Key">
    1. The requested token will be found in the sent email
    2. Copy the token found in the email

    <Warning>
      Keep your API key secure - it grants access to your SFMTA API quota
    </Warning>
  </Step>
</Steps>

## Add to Anything project

<Steps>
  <Step title="Add the integration">
    1. In your Anything project, type `/` in the chat
    2. Select "SFMTA" from the menu
  </Step>

  <Step title="Add your API key">
    1. Paste your API key into the "SFMTA\_API\_KEY" field

    <Tip>
      Need a new key? Generate one in your SFMTA developer dashboard.
    </Tip>
  </Step>

  <Step title="Use it">
    You can now use prompts with the integration to access transit data.

    Some examples:

    * `Get real-time bus arrivals using /SFMTA`
    * `Show transit routes with /SFMTA`
    * `Create a transit tracker using /SFMTA`

    <Warning>
      The API limits how often your app can fetch data. If your app loads the same data often, ask the agent to save it locally so it doesn't re-fetch every time.
    </Warning>

    Example prompt for optimization:

    ```
    When using /SFMTA, save the transit schedules so my app doesn't have to fetch them again
    ```
  </Step>
</Steps>

<Tip>
  Your SFMTA integration is now ready! Use the `/SFMTA` command in chat to access San Francisco transit data.
</Tip>
