{"id":34004807,"url":"https://github.com/socrata/soda-php","last_synced_at":"2026-03-17T16:04:52.315Z","repository":{"id":45174082,"uuid":"630425","full_name":"socrata/soda-php","owner":"socrata","description":"A simple library to make it easier to access SODA services from PHP","archived":false,"fork":false,"pushed_at":"2022-01-03T20:47:07.000Z","size":41,"stargazers_count":63,"open_issues_count":4,"forks_count":27,"subscribers_count":61,"default_branch":"main","last_synced_at":"2025-12-04T10:28:00.097Z","etag":null,"topics":["engineering"],"latest_commit_sha":null,"homepage":"http://dev.socrata.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/socrata.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":"2010-04-26T22:05:58.000Z","updated_at":"2025-12-01T20:11:57.000Z","dependencies_parsed_at":"2022-09-05T19:30:20.172Z","dependency_job_id":null,"html_url":"https://github.com/socrata/soda-php","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/socrata/soda-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socrata%2Fsoda-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socrata%2Fsoda-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socrata%2Fsoda-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socrata%2Fsoda-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/socrata","download_url":"https://codeload.github.com/socrata/soda-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socrata%2Fsoda-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27704064,"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-12-13T02:00:09.769Z","response_time":147,"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":["engineering"],"created_at":"2025-12-13T10:17:16.878Z","updated_at":"2025-12-13T10:17:17.739Z","avatar_url":"https://github.com/socrata.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![Build Status](https://travis-ci.org/socrata/soda-php.svg?branch=chrismetcalf%2Ftravis)](https://travis-ci.org/socrata/soda-php)\n\n# Socrata - Basic PHP Library\nThis library provides a simple wrapper for accessing some of the features of the Socrata Open Data API from PHP. Currently it supports HTTP GET, POST, and PUT operations.\n\nThe library is very simple. To access the Socrata API, you first instantiate a \"Socrata\" object, passing in the domain of the data site you wish to access. The library will also accept the full root path including the protocol (ex: `http://data.medicare.gov`). Then you can use its included methods to make simple API calls:\n\n## Supported PHP versions\n\nIn order to access the SODA API via HTTPS, clients must now [support the Server Name Indication (SNI)](https://dev.socrata.com/changelog/2016/08/24/sni-now-required-for-https-connections.html) extension to the TLS protocol. What does this mean? It means that if you're using `soda-php`, you must [use PHP 5.6 or above](https://en.wikipedia.org/wiki/Server_Name_Indication), as that is when PHP introduced support for SNI.\n\n## Install\nVia composer\n\n``` bash\ncomposer require socrata/soda-php\n```\n\n## Usage\n```php\n$socrata = new Socrata(\"data.medicare.gov\");\n$response = $socrata-\u003eget(\"abcd-2345\");\n```\nIn your API calls, specify ether the full endpoint relative path (eg: `/resource/abcd-2345.json`), or the dataset ID (eg: `abcd-2345`).\n\n## Querying\n\n[Simple filters](http://dev.socrata.com/docs/filtering.html) and [SoQL Queries](http://dev.socrata.com/docs/queries.html) can be passed as a parameter to the `get` function:\n\n```php\n$socrata = new Socrata(\"data.austintexas.gov\", $app_token);\n\n$params = array(\"\\$where\" =\u003e \"within_circle(location, $latitude, $longitude, $range)\");\n\n$response = $socrata-\u003eget($view_uid, $params);\n```\n\n## Publishing\n\nTo use the library to publish data you can use the PUT (replace) or POST (upsert) methods:\n\n```php\n$socrata = new Socrata(\"data.medicare.gov\", $app_token, $user_name, $password);\n\n// Publish data via 'upsert'\n$response = $socrata-\u003epost(\"abcd-2345\", $data_as_json);\n\n// Publish data via 'replace'\n$response = $socrata-\u003eput(\"abcd-2345\", $data_as_json);\n```\n\nThe library also includes a simple example application, which retrieves rows from a dataset and dumps them in a simple table.\n\n## License\n\nApache License, Version 2.0. Please see [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocrata%2Fsoda-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocrata%2Fsoda-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocrata%2Fsoda-php/lists"}