餐饮外卖运营助手 Restaurant Operation Optimizer

餐饮外卖运营助手 Restaurant Operation Optimizer · GPT Actions

Google Places API

This API allows you to access information about places using HTTP requests. It includes methods such as place search and place details.

  • GET /nearbysearch/jsonSearch for places nearby.
  • GET /details/jsonGet details about a specific place.
原始 API 定义
{
  "openapi": "3.1.0",
  "info": {
    "title": "Google Places API",
    "description": "This API allows you to access information about places using HTTP requests. It includes methods such as place search and place details.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://maps.googleapis.com/maps/api/place",
      "description": "Google Places API server"
    }
  ],
  "paths": {
    "/nearbysearch/json": {
      "get": {
        "operationId": "searchNearbyPlaces",
        "summary": "Search for places nearby.",
        "parameters": [
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your API key. Use the placeholder `{API_KEY}` to replace at runtime."
          },
          {
            "name": "location",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The latitude/longitude around which to retrieve place information."
          },
          {
            "name": "radius",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "The distance (in meters) within which to return place results."
          },
          {
            "name": "keyword",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "A term to be matched against all content that Google has indexed for this place."
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The language in which to return results."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response with a list of nearby places.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "place_id": {
                            "type": "string"
                          },
                          "vicinity": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/details/json": {
      "get": {
        "operationId": "getPlaceDetails",
        "summary": "Get details about a specific place.",
        "parameters": [
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your API key. Use the placeholder `{API_KEY}` to replace at runtime."
          },
          {
            "name": "place_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The place ID of the place for which details are being requested."
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The language in which to return results."
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response with details about the specified place.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "formatted_address": {
                          "type": "string"
                        },
                        "geometry": {
                          "type": "object",
                          "properties": {
                            "location": {
                              "type": "object",
                              "properties": {
                                "lat": {
                                  "type": "number"
                                },
                                "lng": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Place": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "geometry": {
            "$ref": "#/components/schemas/Geometry"
          }
        }
      },
      "Geometry": {
        "type": "object",
        "properties": {
          "location": {
            "$ref": "#/components/schemas/Location"
          }
        }
      },
      "Location": {
        "type": "object",
        "properties": {
          "lat": {
            "type": "number"
          },
          "lng": {
            "type": "number"
          }
        }
      }
    }
  }
}

Yelp Fusion API

API for accessing Yelp business data and user reviews.

  • GET /businesses/searchSearch for businesses

    Retrieve up to 1000 businesses based on search criteria.

  • GET /businesses/{id}Get business details

    Retrieve detailed information of a business by its ID.

  • GET /businesses/{id}/reviewsGet business reviews

    Retrieve up to three reviews of a business by its ID.

原始 API 定义
{
  "openapi": "3.1.0",
  "info": {
    "title": "Yelp Fusion API",
    "description": "API for accessing Yelp business data and user reviews.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.yelp.com/v3",
      "description": "Yelp Fusion API Server"
    }
  ],
  "paths": {
    "/businesses/search": {
      "get": {
        "operationId": "searchBusinesses",
        "summary": "Search for businesses",
        "description": "Retrieve up to 1000 businesses based on search criteria.",
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The location to search for businesses."
          },
          {
            "name": "term",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Search term (e.g., \"food\", \"restaurants\")."
          },
          {
            "name": "categories",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Category filter (e.g., \"restaurants\")."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of businesses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "businesses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "rating": {
                            "type": "number"
                          },
                          "price": {
                            "type": "string"
                          },
                          "phone": {
                            "type": "string"
                          },
                          "location": {
                            "type": "object",
                            "properties": {
                              "address1": {
                                "type": "string"
                              },
                              "city": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              },
                              "zip_code": {
                                "type": "string"
                              }
                            }
                          },
                          "coordinates": {
                            "type": "object",
                            "properties": {
                              "latitude": {
                                "type": "number"
                              },
                              "longitude": {
                                "type": "number"
                              }
                            }
                          },
                          "image_url": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/businesses/{id}": {
      "get": {
        "operationId": "getBusinessDetails",
        "summary": "Get business details",
        "description": "Retrieve detailed information of a business by its ID.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID of the business."
          }
        ],
        "responses": {
          "200": {
            "description": "Detailed business information",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "rating": {
                      "type": "number"
                    },
                    "price": {
                      "type": "string"
                    },
                    "phone": {
                      "type": "string"
                    },
                    "location": {
                      "type": "object",
                      "properties": {
                        "address1": {
                          "type": "string"
                        },
                        "city": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string"
                        },
                        "zip_code": {
                          "type": "string"
                        }
                      }
                    },
                    "coordinates": {
                      "type": "object",
                      "properties": {
                        "latitude": {
                          "type": "number"
                        },
                        "longitude": {
                          "type": "number"
                        }
                      }
                    },
                    "image_url": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "hours": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "hours_type": {
                            "type": "string"
                          },
                          "is_open_now": {
                            "type": "boolean"
                          },
                          "open": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "day": {
                                  "type": "integer"
                                },
                                "start": {
                                  "type": "string"
                                },
                                "end": {
                                  "type": "string"
                                },
                                "is_overnight": {
                                  "type": "boolean"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/businesses/{id}/reviews": {
      "get": {
        "operationId": "getBusinessReviews",
        "summary": "Get business reviews",
        "description": "Retrieve up to three reviews of a business by its ID.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID of the business."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of reviews",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reviews": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          },
                          "rating": {
                            "type": "integer"
                          },
                          "user": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "image_url": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Registered Business Locations - San Francisco API

An API to fetch business location data in San Francisco using the SODA Consumer API.

  • GET /Retrieve business location data from the San Francisco registry.
原始 API 定义
{
  "openapi": "3.1.0",
  "info": {
    "title": "Registered Business Locations - San Francisco API",
    "version": "1.0.0",
    "description": "An API to fetch business location data in San Francisco using the SODA Consumer API."
  },
  "servers": [
    {
      "url": "https://data.sfgov.org/resource/g8m3-pdis.json",
      "description": "San Francisco Open Data API Server"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "summary": "Retrieve business location data from the San Francisco registry.",
        "operationId": "getBusinessLocations",
        "parameters": [
          {
            "name": "uniqueid",
            "in": "query",
            "required": false,
            "description": "Unique ID of the business location.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dba_name",
            "in": "query",
            "required": false,
            "description": "The trade name under which the business operates.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "naic_code_description",
            "in": "query",
            "required": true,
            "description": "Filter by NAIC code description (e.g., 'Food Services').",
            "schema": {
              "type": "string",
              "default": "Food Services"
            }
          },
          {
            "name": "$limit",
            "in": "query",
            "required": false,
            "description": "Number of records to return (max 1000).",
            "schema": {
              "type": "integer",
              "default": 1000
            }
          },
          {
            "name": "$offset",
            "in": "query",
            "required": false,
            "description": "Offset for pagination (use to skip records).",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Business location data retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Invalid request or no matching records found."
          }
        }
      }
    }
  }
}