{"id":31816715,"url":"https://github.com/splunk/splunk-demo-yelp-search-command","last_synced_at":"2025-10-11T09:57:56.283Z","repository":{"id":13902536,"uuid":"16601143","full_name":"splunk/splunk-demo-yelp-search-command","owner":"splunk","description":"A custom search command for querying Yelp's API","archived":false,"fork":false,"pushed_at":"2014-05-29T05:41:47.000Z","size":1260,"stargazers_count":10,"open_issues_count":0,"forks_count":6,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-04-15T02:58:42.405Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/splunk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-07T01:47:23.000Z","updated_at":"2021-04-22T19:33:27.000Z","dependencies_parsed_at":"2022-09-19T10:41:11.805Z","dependency_job_id":null,"html_url":"https://github.com/splunk/splunk-demo-yelp-search-command","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/splunk/splunk-demo-yelp-search-command","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splunk%2Fsplunk-demo-yelp-search-command","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splunk%2Fsplunk-demo-yelp-search-command/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splunk%2Fsplunk-demo-yelp-search-command/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splunk%2Fsplunk-demo-yelp-search-command/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/splunk","download_url":"https://codeload.github.com/splunk/splunk-demo-yelp-search-command/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splunk%2Fsplunk-demo-yelp-search-command/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006749,"owners_count":26084185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-11T09:57:49.911Z","updated_at":"2025-10-11T09:57:56.275Z","avatar_url":"https://github.com/splunk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"splunk-demo-yelp-search-command\n===============================\n\nA custom search command for querying [Yelp's API] (http://www.yelp.com/developers/documentation)! This demonstrates how to use the Python SDK's `GeneratingCommand` to query an external API and pipe results into Splunk. You can use the patterns here basically for talking to any API in an adhoc fashion.\n\n# What is it?\n\nThis is a custom search command implemented using Python SDK which uses Yelp's API. It allows issuing adhoc queries realtime against Yelp data which is then pulled into Splunk.\n\n# Pre-requisites.\n\n* An instance of Splunk where you can install the command.\n* An valid set of API credentials for Yelp's API. Sign up [here] (http://www.yelp.com/developers/getting_started) for an account and register for an API key.\n\n# Setup\n\n* Copy this application to a new folder in your `$SPLUNK_HOME$\\etc\\apps\\` folder.\n* Change to the bin folder of your app and rename the config.template file to config.json.\n* Edit the config.json with your favorite text editor replace the values with the corresponding values from the [Yelp API management portal] (http://www.yelp.com/developers/getting_started/api_access).\n* Restart your splunk instance so the the app is loaded.\n\n# Yelp Command 101\n\nUsing the Yelp command is very easy, open your Splunk portal and go to the Yelp Search app. Now you can use the \"yelp\" command. Below are a few simple examples of syntax.\n\nFinding sushi and italian restaurants in San Francisco\n```\n| yelp location=\"San Franciso\" term=sushi,italian\n```\n\nFinding sports shops in New York\n\n```\n| yelp location=\"New York\" term=\"Sporting Goods\"\n```\n\nFinding all skydiving places in New Zealand\n\n```\n| yelp location=\"Auckland, New Zealand\" term=\"Sky diving\"\n```\n\nFinding all museums in London\n\n```\n| yelp location=\"London\" term=museums\n```\n\n# Parameters\n\nThe following is the list of parameters. Any values that contain spaces, must be within double quotes.\n\n* location - [required] Location to search for businesses\n* term - [optional] Type of business to search for.\n* category - [optional] Delimitted list of categories. See [here] (http://www.yelp.com/developers/documentation/category_list) for the supported list.\n* sort - [optional] 0=Best matched, 1=Distance (default), 2=Highest Rated\n* limit [optional] Number of records to return. (max=20).\n* offset [optional] Offset the list of returned business results by this amount.\n\n# Running outside of Splunk.\n\nFor testing you can actually run the command outside of Splunk. Below are the steps.\n\n* Go to the bin folder underneath the app.\n* Use the following command template:\n\n```\npython yelp.py __EXECUTE__ location=[location] term=[term] \u003c empty.csv\n```\n\nThis will run the command and dump the results to your console. For example...\n\n```\npython yelp.py __EXECUTE__ location=NY term=italian \u003c empty.csv\n```\n\nIf the paramter has spaces, surround the full parameter and value in single quotes and use double quotes for the value i.e.\n\n```\npython yelp.py __EXECUTE__ 'location=\"San Francisco\"' term=korean \u003c empty.csv\n```\n\n# License\n\nThe Splunk Demo Yelp Search Command is licensed under the Apache License 2.0. Details can be found in the file LICENSE.\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplunk%2Fsplunk-demo-yelp-search-command","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsplunk%2Fsplunk-demo-yelp-search-command","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplunk%2Fsplunk-demo-yelp-search-command/lists"}