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

# Search Nonprofits



## OpenAPI

````yaml GET /beta/nonprofits/search
openapi: 3.1.0
info:
  title: Giving Compass Insights
  description: >+

    ## Overview


    The Giving Compass Insights API provides access to nonprofit data, impact
    stories, financial information, and AI-powered search capabilities.


    ## Authentication


    All endpoints require an API key passed via the `X-API-Key` header.


    ```

    X-API-Key: your_api_key_here

    ```



    ## Core Capabilities


    ### Nonprofit Search

    Search and filter nonprofits by location, revenue, expenses, cause areas,
    and Charity Navigator ratings.


    ### Impact Data

    Access AI-extracted impact stories and metrics from nonprofit annual
    reports:

    - **Stories**: Human transformation narratives with emotional hooks, quotes,
    and before/after states

    - **Metrics**: Quantitative measures (people served, meals distributed,
    volunteers, etc.)


    ### Feed Data

    Access and filter nonprofit posts (articles, events, videos, job postings)
    from organizations:

    - **Content Types**: Filter by classification (articles, videos, events,
    podcasts, job postings, volunteer opportunities)

    - **Location Filtering**: Filter posts by nonprofit's city, county, state,
    ZIP code, or geographic radius (lat/lng)

    - **Cause Area Filtering**: Filter by NTEE codes to find posts from
    organizations working in specific cause areas


    ### AI Chat

    Natural language search for nonprofits and content. Example queries:

    - `Find articles about clean water`

    - `Find nonprofits in Chicago with revenue over 100k`

    - `Show nonprofits in TX that help the blind`

    - `Nonprofits that are similar to JDRF`

    - `Nonprofits that focus on SDG 5 with revenue between 1M and 5M`

  version: 1.0.0
servers:
  - url: https://api.givingcompass.org/insights
security: []
tags:
  - name: Insights
    description: >-
      Search nonprofits, retrieve financial data, and access AI-powered chat for
      nonprofit discovery.
  - name: Impact
    description: >-
      Access impact stories and metrics extracted from nonprofit annual reports.
      Stories are human transformation narratives with emotional hooks and
      quotes. Metrics are quantitative measures reported by nonprofits.
  - name: Feed
    description: >-
      Access nonprofit posts and content feeds with advanced filtering by
      location, cause area, and content type. Filter posts by organization
      location (city, county, state, ZIP, lat/lng radius) and NTEE codes
  - name: Beta
    description: Beta endpoints - may change without notice.
paths:
  /beta/nonprofits/search:
    get:
      tags:
        - Beta
      summary: Search Nonprofits
      operationId: search_nonprofits_beta_nonprofits_search_get
      parameters:
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 256
              - type: 'null'
            title: Primary Query
            description: Primary query used for the search
          description: Primary query used for the search
        - name: subsection_codes
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  minLength: 2
                  maxLength: 2
                  pattern: ^\d{2}$
              - type: 'null'
            title: Subsection
            description: >-
              List of 2-character numeric subsection codes (e.g., '03' indicates
              a 501C3, '04' indicates a 501C4)
          description: >-
            List of 2-character numeric subsection codes (e.g., '03' indicates a
            501C3, '04' indicates a 501C4)
        - name: foundation
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Include/exclude foundations
            description: >-
              Flag to filter by foundation status. If true, only foundations are
              included, and excluded if false.
          description: >-
            Flag to filter by foundation status. If true, only foundations are
            included, and excluded if false.
        - name: deductible_donations
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Deductible Donations
            description: >-
              Flag to limit the search to organizations with deductible
              donations
          description: Flag to limit the search to organizations with deductible donations
        - name: latitude
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Latitude
            description: Latitude for location-based search
          description: Latitude for location-based search
        - name: longitude
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            title: Longitude
            description: Longitude for location-based search
          description: Longitude for location-based search
        - name: location_range
          in: query
          required: false
          schema:
            anyOf:
              - type: number
                minimum: 0
              - type: 'null'
            title: Location Range
            description: Search radius in miles (0 for unlimited)
          description: Search radius in miles (0 for unlimited)
        - name: city
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 2
                maxLength: 100
              - type: 'null'
            title: City
            description: City for location-based search
          description: City for location-based search
        - name: county
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 2
                maxLength: 100
              - type: 'null'
            title: County
            description: County for location-based search
          description: County for location-based search
        - name: state
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 2
                maxLength: 2
              - type: 'null'
            title: State
            description: State for location-based search (2 character abbreviation)
          description: State for location-based search (2 character abbreviation)
        - name: zip_code
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                pattern: ^\d{5}$
              - type: 'null'
            title: ZIP Code
            description: ZIP Code for location-based search
          description: ZIP Code for location-based search
        - name: min_revenue
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            title: Minimum Revenue
            description: Minimum annual revenue in dollars
          description: Minimum annual revenue in dollars
        - name: max_revenue
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            title: Maximum Revenue
            description: Maximum annual revenue in dollars
          description: Maximum annual revenue in dollars
        - name: min_expenses
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            title: Minimum Expenses
            description: Minimum annual expenses in dollars
          description: Minimum annual expenses in dollars
        - name: max_expenses
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            title: Maximum Expenses
            description: Maximum annual expenses in dollars
          description: Maximum annual expenses in dollars
        - name: min_assets
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            title: Minimum Assets
            description: Minimum total assets in dollars
          description: Minimum total assets in dollars
        - name: max_assets
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            title: Maximum Assets
            description: Maximum total assets in dollars
          description: Maximum total assets in dollars
        - name: sdgs
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: integer
                  maximum: 17
                  minimum: 1
              - type: 'null'
            title: Sustainable Development Goals
            description: List of SDG numbers to filter by
            default: []
          description: List of SDG numbers to filter by
        - name: ntee_codes
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: NTEE Codes
            description: List of NTEE (National Taxonomy of Exempt Entities) codes
            default: []
          description: List of NTEE (National Taxonomy of Exempt Entities) codes
        - name: min_employees
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            title: Minimum Employee Count
            description: Minimum number of employees
          description: Minimum number of employees
        - name: max_employees
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            title: Maximum Employee Count
            description: Maximum number of employees
          description: Maximum number of employees
        - name: min_score
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 100
                minimum: 0
              - type: 'null'
            title: Minimum organization score
            description: Minimum organization score
          description: Minimum organization score
        - name: max_score
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 100
                minimum: 0
              - type: 'null'
            title: Maximum organization score
            description: Maximum organization score
          description: Maximum organization score
        - name: min_rating
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 4
                minimum: 0
              - type: 'null'
            title: Minimum Star Rating
            description: Minimum star rating for organization
          description: Minimum star rating for organization
        - name: max_rating
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 4
                minimum: 0
              - type: 'null'
            title: Minimum Star Rating
            description: Maximum star rating for organization
          description: Maximum star rating for organization
        - name: org_size
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Organization Sizes
            description: >-
              One or more sizes of the organization based on classification.
              Valid values are 'Small', 'Medium', 'Large', and 'Super-Size'.
            default: []
          description: >-
            One or more sizes of the organization based on classification. Valid
            values are 'Small', 'Medium', 'Large', and 'Super-Size'.
        - name: sort
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Sort Options
            description: Sort options for the search results.
          description: Sort options for the search results.
        - name: max_vector_distance
          in: query
          required: false
          schema:
            anyOf:
              - type: number
                maximum: 1
                minimum: 0
              - type: 'null'
            title: Maximum Vector Distance
            description: >-
              Max vector distance for the search. Higher number means more
              lenient vector matching.
          description: >-
            Max vector distance for the search. Higher number means more lenient
            vector matching.
        - name: model
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: LLM Model
            description: >-
              LLM model to use for intent processing. Options:
              'gemini-2.5-flash-lite' (default) or 'gpt-3.5-turbo-0125'.
            default: gemini-2.5-flash-lite
          description: >-
            LLM model to use for intent processing. Options:
            'gemini-2.5-flash-lite' (default) or 'gpt-3.5-turbo-0125'.
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number
            default: 1
            title: Page
          description: Page number
        - name: size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Items per page
            default: 10
            title: Size
          description: Items per page
        - name: x-session-id
          in: header
          required: false
          schema:
            type: string
            format: uuid
            description: A unique UUID value to maintain context
            title: X-Session-Id
          description: A unique UUID value to maintain context
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaNonprofitSearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    BetaNonprofitSearchResponse:
      properties:
        intentDetails:
          anyOf:
            - $ref: '#/components/schemas/BetaChatIntentResponse'
            - type: 'null'
        nonprofits:
          anyOf:
            - items:
                $ref: '#/components/schemas/BetaNonprofitDetailsResponse'
              type: array
            - type: 'null'
          title: Nonprofits
      type: object
      title: BetaNonprofitSearchResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BetaChatIntentResponse:
      properties:
        llm_response:
          anyOf:
            - $ref: '#/components/schemas/LLMFunctionCallResult'
            - type: 'null'
        intent:
          anyOf:
            - type: string
            - type: 'null'
          title: Intent
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
        cause:
          anyOf:
            - type: string
            - type: 'null'
          title: Cause
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        zip:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip
        min_revenue:
          anyOf:
            - type: number
            - type: 'null'
          title: Min Revenue
        max_revenue:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Revenue
        sdgs:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Sdgs
        ntee_codes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Ntee Codes
        organization_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Name
        organization_ein:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Ein
        min_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Min Score
        max_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Score
        min_rating:
          anyOf:
            - type: integer
            - type: 'null'
          title: Min Rating
        max_rating:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Rating
        org_size:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Org Size
      type: object
      title: BetaChatIntentResponse
      description: >-
        Response model for chat intents in the insights beta endpoint - Based
        off ChatIntentResponse
    BetaNonprofitDetailsResponse:
      properties:
        vectorScore:
          anyOf:
            - type: number
            - type: 'null'
          title: Vectorscore
        ein:
          type: string
          title: Ein
        name:
          type: string
          title: Name
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        streetAddress:
          anyOf:
            - type: string
            - type: 'null'
          title: Streetaddress
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        zipCode5:
          anyOf:
            - type: string
            - type: 'null'
          title: Zipcode5
        ntee:
          anyOf:
            - type: string
            - type: 'null'
          title: Ntee
        issueArea:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuearea
        yearFounded:
          anyOf:
            - type: integer
            - type: 'null'
          title: Yearfounded
        filingYear:
          anyOf:
            - type: integer
            - type: 'null'
          title: Filingyear
        revenueGrandTotal:
          anyOf:
            - type: number
            - type: 'null'
          title: Revenuegrandtotal
        netAssets:
          anyOf:
            - type: number
            - type: 'null'
          title: Netassets
        foundation:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Foundation
        inactive:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Inactive
        irsRulingDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Irsrulingdate
        sdgs:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Sdgs
        formType:
          anyOf:
            - type: string
            - type: 'null'
          title: Formtype
        lat:
          anyOf:
            - type: number
            - type: 'null'
          title: Lat
        lng:
          anyOf:
            - type: number
            - type: 'null'
          title: Lng
        cnScore:
          anyOf:
            - type: number
            - type: 'null'
          title: Cnscore
        cnRating:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cnrating
        cnSize:
          anyOf:
            - type: string
            - type: 'null'
          title: Cnsize
      type: object
      required:
        - ein
        - name
        - url
        - summary
        - streetAddress
        - city
        - state
        - zipCode5
        - ntee
        - issueArea
        - yearFounded
        - filingYear
        - revenueGrandTotal
        - netAssets
        - foundation
        - inactive
        - irsRulingDate
        - sdgs
        - formType
        - lat
        - lng
        - cnScore
        - cnRating
        - cnSize
      title: BetaNonprofitDetailsResponse
      description: Response model for nonprofit details in the insights beta endpoint.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    LLMFunctionCallResult:
      properties:
        function_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Function Name
        arguments:
          type: object
          title: Arguments
          default: {}
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
      type: object
      title: LLMFunctionCallResult
      description: Holds the raw results of a GPT function call
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: Add a header [X-API-Key] with the token
      in: header
      name: X-API-Key

````