{"ok":true,"site":"datasf","host":"data.sfgov.org","about":"San Francisco Open Data portal (data.sfgov.org, now served from data.sf.gov on Socrata): search the city's dataset catalog, read dataset metadata and columns, and query, export or map dataset records with SoQL.","commands":[{"command":"search-datasets","summary":"Search or browse the SF open data catalog by keyword, category, tag, publishing department or asset type; returns dataset ids, names and stats","params":[{"name":"q","type":"string","description":"Free-text keywords, e.g. 'building permits'. Omit to browse by filters only."},{"name":"categories","type":"string","description":"Catalog category, e.g. 'Housing and Buildings', 'Health and Social Services', 'Economy and Community', 'City Management and Ethics', 'COVID-19'. list-catalog-filters returns the full list."},{"name":"tags","type":"string","description":"Tag to filter by, e.g. 'transit', 'business', 'gis'"},{"name":"attribution","type":"string","description":"Publishing agency or department attribution, e.g. 'SFMTA'"},{"name":"department","type":"string","description":"Publishing Department facet value, e.g. '311'. list-catalog-filters returns the allowed values."},{"name":"only","type":"string","description":"Restrict to one asset type, e.g. dataset, map, chart, filter, story, file, href"},{"name":"order","type":"string","description":"Sort order","oneOf":["relevance","page_views_total","name"],"default":"relevance"},{"name":"api_limit","type":"number","description":"Results per page (sent to the site as \"limit\"; clify's own --limit only shapes the output)","default":20},{"name":"offset","type":"number","description":"Number of results to skip (0, 20, 40...)","default":0}],"exampleUrl":"https://clify-dev.netlify.app/datasf/search-datasets?q=building+permits&categories=Housing+and+Buildings&tags=transit&attribution=SFMTA&only=dataset"},{"command":"query-dataset-records","summary":"Fetch rows from a dataset as JSON with SoQL filtering, sorting, column selection, aggregation and paging. Use get-dataset to find column field names.","params":[{"name":"datasetId","type":"string","required":true,"description":"Dataset id (four-four format, e.g. i98e-djp9 for Building Permits)"},{"name":"where","type":"string","description":"SoQL filter, e.g. street_name='Market' or filed_date > '2024-01-01'"},{"name":"order","type":"string","description":"SoQL sort, e.g. 'filed_date DESC'"},{"name":"select","type":"string","description":"Columns or aggregates to return, e.g. 'permit_number,status' or 'count(*)' for the row count"},{"name":"group","type":"string","description":"SoQL GROUP BY columns, used with aggregates in select, e.g. 'status'"},{"name":"q","type":"string","description":"Full-text search across all text columns"},{"name":"api_limit","type":"number","description":"Maximum rows to return (sent to the site as \"limit\"; clify's own --limit only shapes the output)","default":20},{"name":"offset","type":"number","description":"Rows to skip, for paging","default":0}],"exampleUrl":"https://clify-dev.netlify.app/datasf/query-dataset-records?datasetId=i98e-djp9&where=street_name%3D%27Market%27&order=filed_date+DESC&api_limit=5"},{"command":"get-dataset","summary":"Get a dataset's metadata: name, description, category, publishing department, update times, view and download counts, and its columns (fieldName, type, description)","params":[{"name":"datasetId","type":"string","required":true,"description":"Dataset id (four-four format, e.g. i98e-djp9)"}],"exampleUrl":"https://clify-dev.netlify.app/datasf/get-dataset?datasetId=i98e-djp9"},{"command":"export-dataset-csv","summary":"Export dataset rows as CSV text, with the same SoQL filter, sort and limit options as query-dataset-records","params":[{"name":"datasetId","type":"string","required":true,"description":"Dataset id (four-four format, e.g. vw6y-z8j6 for 311 cases)"},{"name":"where","type":"string","description":"SoQL filter expression"},{"name":"order","type":"string","description":"SoQL sort, e.g. 'requested_datetime DESC'"},{"name":"select","type":"string","description":"Comma-separated columns to include"},{"name":"api_limit","type":"number","description":"Maximum rows (sent to the site as \"limit\"; clify's own --limit only shapes the output)","default":100},{"name":"offset","type":"number","description":"Rows to skip"}],"exampleUrl":"https://clify-dev.netlify.app/datasf/export-dataset-csv?datasetId=vw6y-z8j6&order=requested_datetime+DESC&api_limit=5"},{"command":"get-dataset-geojson","summary":"Fetch rows of a geographic dataset (neighborhoods, districts, stops) as GeoJSON features with geometry, with optional SoQL filtering","params":[{"name":"datasetId","type":"string","required":true,"description":"Id of a dataset with a geometry column (e.g. j2bu-swwd, Analysis Neighborhoods)"},{"name":"where","type":"string","description":"SoQL filter, e.g. nhood='Mission'"},{"name":"select","type":"string","description":"Columns to return, e.g. 'nhood,the_geom'"},{"name":"api_limit","type":"number","description":"Maximum features (sent to the site as \"limit\"; clify's own --limit only shapes the output)","default":50},{"name":"offset","type":"number","description":"Features to skip"}],"exampleUrl":"https://clify-dev.netlify.app/datasf/get-dataset-geojson?datasetId=j2bu-swwd&api_limit=5"},{"command":"list-catalog-filters","summary":"List the catalog's filter values: categories, Publishing Department options and popular tags, for use with search-datasets","params":[],"exampleUrl":"https://clify-dev.netlify.app/datasf/list-catalog-filters"},{"command":"suggest-dataset-titles","summary":"Quick dataset title suggestions for a partial keyword; use search-datasets to get ids","params":[{"name":"q","type":"string","required":true,"description":"Partial keyword"},{"name":"api_limit","type":"number","description":"Maximum suggestions (sent to the site as \"limit\"; clify's own --limit only shapes the output)","default":6}],"exampleUrl":"https://clify-dev.netlify.app/datasf/suggest-dataset-titles?q=muni+transit"}]}