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

# Google Maps Places Enrich

> Search Google Maps for places and extract detailed business information

The Google Maps Places Enrich flow searches Google Maps for businesses and places, then extracts detailed information including contact details, reviews, and location data. This flow is ideal for local business discovery, market research, and lead generation.

## Flow Steps

The flow executes steps in the following order:

1. **Search Google Maps** (required): Searches Google Maps for places matching your search query
2. **Extract Place Details** (optional): Extracts detailed information for each place found

<Tip>
  You can customize the search by specifying country and language parameters to get location-relevant results. Use the `max_results` parameter to control how many places to extract (up to 1,000).
</Tip>

<Accordion title="Custom Data">
  Each item in the `inputs` array can include an optional **`custom_data`** object. The only valid key inside `custom_data` is **`meta`**. Use `meta` to attach a free-form object (e.g. your own IDs, tags, or context) that will be passed through and available in the flow output.

  **Example:**

  ```json theme={null}
  "inputs": [
    {
      ...
      "custom_data": {
        "meta": {
          "foo": "bar",
          "crm_id": 1234
        }
      }
    }
  ]
  ```

  <Info>
    We currently require **`meta`** as a workaround to ship this capability; a more solid implementation will follow soon without breaking changes.
  </Info>
</Accordion>

**Examples**:

<AccordionGroup>
  <Accordion title="Basic place search">
    ```bash theme={null}
    curl --request POST \
      --url https://api.edges.run/v1/flows/google-maps-places-enrich/run/async \
      --header 'Content-Type: application/json' \
      --header 'X-API-Key: <your-api-key>' \
      --data '{
      "inputs": [
        {
          "google_maps_search_url": "https://www.google.com/maps/search/coffee+shops+near+San+Francisco"
        }
      ]
    }'
    ```
  </Accordion>

  <Accordion title="Search with country and language settings">
    ```bash theme={null}
    curl --request POST \
      --url https://api.edges.run/v1/flows/google-maps-places-enrich/run/async \
      --header 'Content-Type: application/json' \
      --header 'X-API-Key: <your-api-key>' \
      --data '{
      "parameters": {
        "googlemaps-search-places": {
          "country": "FR",
          "language": "fr",
          "max_results": 200
        },
        "googlemaps-extract-place": {
          "country": "FR",
          "language": "fr"
        }
      },
      "inputs": [
        {
          "google_maps_search_url": "https://www.google.fr/maps/search/restaurants+paris"
        }
      ]
    }'
    ```
  </Accordion>

  <Accordion title="With webhook callback">
    ```bash theme={null}
    curl --request POST \
      --url https://api.edges.run/v1/flows/google-maps-places-enrich/run/async \
      --header 'Content-Type: application/json' \
      --header 'X-API-Key: <your-api-key>' \
      --data '{
      "parameters": {
        "googlemaps-search-places": {
          "max_results": 500
        }
      },
      "inputs": [
        {
          "google_maps_search_url": "https://www.google.com/maps/search/gyms+near+New+York"
        }
      ],
      "callback": {
        "url": "https://your-app.com/webhook/flow-results",
        "headers": {
          "Authorization": "Bearer your-webhook-token"
        }
      }
    }'
    ```
  </Accordion>
</AccordionGroup>

## Output Fields

The flow returns detailed place information including:

| Field                   | Description                 |
| ----------------------- | --------------------------- |
| `place_name`            | Name of the business/place  |
| `address`               | Full address                |
| `phone`                 | Phone number                |
| `website`               | Website URL                 |
| `rating`                | Average rating (1-5)        |
| `number_reviews`        | Total number of reviews     |
| `category`              | Business category           |
| `opening_hours`         | Opening hours schedule      |
| `description`           | Business description        |
| `google_maps_place_url` | Direct link to Google Maps  |
| `google_maps_place_id`  | Unique Google Maps place ID |
| `coordinates_latitude`  | Latitude coordinate         |
| `coordinates_longitude` | Longitude coordinate        |

<Info>
  Instead of polling for results, you can use webhooks to receive automatic notifications when this flow completes. Learn more about [webhook payloads and handling](/api/callbacks).
</Info>


## OpenAPI

````yaml POST /flows/google-maps-places-enrich/run/async
openapi: 3.1.0
info:
  title: ED Automation Flows API
  description: This is the Flows API documentation for ED Automation
  version: dev
servers:
  - url: https://api.edges.run/v1
security:
  - XApiKeyAuth: []
paths:
  /flows/google-maps-places-enrich/run/async:
    post:
      tags:
        - flows
      summary: Run google-maps-places-enrich flow asynchronously
      description: Used to create and run a given flow preset.
      operationId: flowGoogleMapsPlacesEnrichAsync
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                steps:
                  type: array
                  items:
                    type: string
                    enum: []
                  description: >-
                    Optional list of step to run. If not provided, only the
                    required steps will be run.
                parameters:
                  type: object
                  properties:
                    googlemaps-search-places:
                      type: object
                      properties:
                        country:
                          type: string
                          title: Country
                          enum:
                            - US
                            - FR
                            - DE
                            - ES
                            - UK
                            - BE
                            - BR
                            - IN
                            - TH
                            - CA
                            - AU
                            - IT
                          default: US
                          description: >-
                            The country you wish to search from approximate
                            geolocation. If you want to search near an area, you
                            can use the keyword near in your query.
                          x-display-widget: select
                        language:
                          type: string
                          title: Language
                          enum:
                            - en
                            - fr
                            - it
                            - de
                            - es
                            - pt
                          default: en
                          description: The language you wish to search in.
                          x-display-widget: select
                        max_results:
                          type: integer
                          title: Maximum results
                          default: 100
                          maximum: 1000
                          minimum: 1
                          description: The maximum number of results to extract.
                          xAutoPaginate: true
                          x-display-widget: numeric
                      additionalProperties: false
                      default: {}
                    googlemaps-extract-place:
                      type: object
                      properties:
                        country:
                          type: string
                          title: Country
                          enum:
                            - US
                            - FR
                            - DE
                            - ES
                            - UK
                            - BE
                            - BR
                            - IN
                            - TH
                            - CA
                            - AU
                            - IT
                          default: US
                          description: >-
                            The country you wish to search from approximate
                            geolocation. If you want to search near an area, you
                            can use the keyword near in your query.
                          x-display-widget: select
                        language:
                          type: string
                          title: Language
                          enum:
                            - en
                            - fr
                            - it
                            - de
                            - es
                            - pt
                          default: en
                          description: The language you wish to search in.
                          x-display-widget: select
                      additionalProperties: false
                      default: {}
                  additionalProperties: false
                inputs:
                  type: array
                  items:
                    $ref: '#/components/schemas/FlowGoogleMapsPlacesEnrichInput'
                  minItems: 1
                  maxItems: 1000
                identity_ids:
                  type: array
                  description: >-
                    An array of Identity UUIDs linked to identities (e.g.
                    LinkedIn) used to execute the Action. You must provide at
                    least one valid UID with access to the integration. Do not
                    use account_uid values — only user_uid is supported.
                  items:
                    type: string
                    format: uuid
                  nullable: true
                  example:
                    - 44444444-4444-4444-4444-444444444444
                identity_mode:
                  type: string
                  enum:
                    - direct
                    - auto
                    - managed
                  default: direct
                  nullable: true
                  description: >-
                    If "auto", the Action will use any identities from the
                    current workspace (unless you have provided a list of
                    identity_ids). "managed" will use the Edges pool of
                    identities for an extra credit cost
                callback:
                  type: object
                  properties:
                    url:
                      type: string
                      description: >-
                        URL to send the results to. The Action will send a POST
                        request with the results to this URL. The request will
                        include a JSON body with the results of the Action.
                      nullable: true
                      pattern: ^(https?:\/\/[^\s]+)$
                      example: https://example.com/callback
                    headers:
                      type: object
                      description: Headers to include in the callback request.
                      additionalProperties:
                        type: string
                    'on':
                      type: string
                      description: >-
                        Define when you want to receive callbacks. "all" will
                        send callbacks to stream outputs, "final" will send a
                        single callback when all inputs are processed or an
                        error occured on the run.
                      enum:
                        - all
                        - final
                      default: all
                  required:
                    - url
              additionalProperties: false
              required:
                - inputs
      responses:
        '200':
          $ref: '#/components/responses/FlowAsyncResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '424':
          $ref: '#/components/responses/FailedDependency'
        '500':
          $ref: '#/components/responses/InternalServerError'
      callbacks:
        onSave:
          '{$request.body#/callback/url}':
            post:
              responses:
                '200':
                  description: Callback successfully processed
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        flow_run:
                          type: object
                          properties:
                            flow_run_uid:
                              type: string
                              format: uuid
                              description: Run UUID
                            step_uid:
                              type: string
                              format: uuid
                              description: Output Step UUID
                              nullable: true
                            status:
                              type: string
                              enum:
                                - CREATED
                                - INVALID
                                - QUEUED
                                - SCHEDULED
                                - BLOCKED
                                - STOPPED
                                - RUNNING
                                - FAILED
                                - PARTIAL_SUCCEEDED
                                - SUCCEEDED
                              description: Flow status
                            scheduled_flow_run_uid:
                              type: string
                              format: uuid
                              description: >-
                                If the flow run is scheduled, this field
                                indicates the scheduled flow run UUID.
                              nullable: true
                          required:
                            - flow_run_uid
                            - status
                        error:
                          $ref: '#/components/schemas/APIError'
                        results_count:
                          type: integer
                          description: Number of results in the current callback
                        results:
                          type: array
                          items:
                            $ref: >-
                              #/components/schemas/FlowGoogleMapsPlacesEnrichOutput
                          description: Results of the current callback
                      required:
                        - run
              method: post
              type: path
            path: '{$request.body#/callback/url}'
components:
  schemas:
    FlowGoogleMapsPlacesEnrichInput:
      type: object
      properties:
        google_maps_search_url:
          pattern: >-
            /(?:http(?:s)?:\/\/){1}(?:www\.)?(google.)(com|fr)(\/maps\/)search\//
          type: string
          format: uri
          description: >-
            A Google Maps Search URL should start with the following:
            https://www.google.com/maps/search/ or be query.
          x-primary: true
          x-help: >-
            A Google Maps Search URL should start with the following:
            https://www.google.com/maps/search/ or be query.
        custom_data:
          type: object
          additionalProperties: true
          description: Custom data (ex-metadata)
          properties:
            meta: {}
      additionalProperties: false
      required:
        - google_maps_search_url
    APIError:
      title: APIError
      description: >-
        Represents an error returned by the API. This schema defines the
        standard structure of error messages to ensure consistent error handling
        across the application.
      type: object
      properties:
        error_label:
          type: string
          nullable: true
        error_scope:
          type: string
          enum:
            - input
            - integ
            - param
            - config
          nullable: true
        error_ref:
          type: string
          examples:
            - ERR-12345
          nullable: true
        message:
          type: string
        status_code:
          type: integer
          nullable: true
        params:
          type: object
          patternProperties:
            ^[^_].*:
              anyOf:
                - type: string
                - type: number
                - type: boolean
                - type: 'null'
                - type: array
                  items:
                    type: string
          additionalProperties: false
          nullable: true
        data:
          type: object
          nullable: true
          additionalProperties: true
          description: Additional data about the error
      additionalProperties: false
    FlowGoogleMapsPlacesEnrichOutput:
      type: object
      properties:
        custom_data:
          type: object
          additionalProperties: true
          description: Custom data (ex-metadata)
          properties:
            meta: {}
        address: {}
        website: {}
        place_name: {}
        google_maps_place_url: {}
        rating: {}
        number_reviews: {}
        category: {}
        opening_hours: {}
        description: {}
        services_available: {}
        additional_info: {}
        google_maps_place_id: {}
        phone: {}
        coordinates_latitude: {}
        coordinates_longitude: {}
        closed_temporarily: {}
        closed_permanently: {}
    BadRequest:
      title: APIError
      description: >-
        Represents an error returned by the API. This schema defines the
        standard structure of error messages to ensure consistent error handling
        across the application.
      type: object
      properties:
        error_label:
          type: string
          nullable: true
        error_scope:
          type: string
          enum:
            - input
            - integ
            - param
            - config
          nullable: true
        error_ref:
          type: string
          nullable: true
          example: ERR-12345
        message:
          type: string
        status_code:
          type: integer
          nullable: true
        params:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
              - type: 'null'
              - type: array
                items:
                  type: string
          nullable: true
        data:
          type: object
          nullable: true
          additionalProperties: true
          description: Additional data about the error
      additionalProperties: false
    FailedDependency:
      title: APIError
      description: >-
        Represents an error returned by the API. This schema defines the
        standard structure of error messages to ensure consistent error handling
        across the application.
      type: object
      properties:
        error_label:
          type: string
          nullable: true
        error_scope:
          type: string
          enum:
            - input
            - integ
            - param
            - config
          nullable: true
        error_ref:
          type: string
          nullable: true
          example: ERR-12345
        message:
          type: string
        status_code:
          type: integer
          nullable: true
        params:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
              - type: 'null'
              - type: array
                items:
                  type: string
          nullable: true
        data:
          type: object
          nullable: true
          additionalProperties: true
          description: Additional data about the error
      additionalProperties: false
    InternalServerError:
      title: APIError
      description: >-
        Represents an error returned by the API. This schema defines the
        standard structure of error messages to ensure consistent error handling
        across the application.
      type: object
      properties:
        error_label:
          type: string
          nullable: true
        error_scope:
          type: string
          enum:
            - input
            - integ
            - param
            - config
          nullable: true
        error_ref:
          type: string
          nullable: true
          example: ERR-12345
        message:
          type: string
        status_code:
          type: integer
          nullable: true
        params:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
              - type: 'null'
              - type: array
                items:
                  type: string
          nullable: true
        data:
          type: object
          nullable: true
          additionalProperties: true
          description: Additional data about the error
      additionalProperties: false
  responses:
    FlowAsyncResponse:
      description: Successful response
      content:
        application/json:
          schema:
            description: Successful response
            type: object
            properties:
              uid:
                type: string
                format: uuid
              workflow:
                type: object
                properties:
                  uid:
                    type: string
                  metadata:
                    type: object
                    properties:
                      account_rotation:
                        type: boolean
                        default: true
                        nullable: true
                    additionalProperties: false
                additionalProperties: false
            additionalProperties: false
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequest'
    FailedDependency:
      description: Failed Dependency
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailedDependency'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
  securitySchemes:
    XApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````