{"id":13714260,"url":"https://github.com/veryfi/veryfi-go","last_synced_at":"2025-05-04T05:32:36.058Z","repository":{"id":47405035,"uuid":"369310891","full_name":"veryfi/veryfi-go","owner":"veryfi","description":"Go module for communicating with the Veryfi OCR API.","archived":false,"fork":false,"pushed_at":"2025-04-01T21:41:46.000Z","size":2587,"stargazers_count":22,"open_issues_count":2,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-01T21:43:23.187Z","etag":null,"topics":["api","go","go-library","go-sdk","golang-library","invoice","ocr","receipt","sdk","sdk-go","veryfi","veryfi-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/veryfi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-20T19:02:43.000Z","updated_at":"2025-03-11T12:45:43.000Z","dependencies_parsed_at":"2023-11-09T02:23:47.184Z","dependency_job_id":"6dac29c2-021a-421b-a184-35e9037424db","html_url":"https://github.com/veryfi/veryfi-go","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veryfi%2Fveryfi-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veryfi%2Fveryfi-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veryfi%2Fveryfi-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veryfi%2Fveryfi-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/veryfi","download_url":"https://codeload.github.com/veryfi/veryfi-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252293082,"owners_count":21724960,"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","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":["api","go","go-library","go-sdk","golang-library","invoice","ocr","receipt","sdk","sdk-go","veryfi","veryfi-api"],"created_at":"2024-08-02T23:01:55.859Z","updated_at":"2025-05-04T05:32:34.638Z","avatar_url":"https://github.com/veryfi.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"\u003cimg src=\"https://user-images.githubusercontent.com/30125790/212157461-58bdc714-2f89-44c2-8e4d-d42bee74854e.png#gh-dark-mode-only\" width=\"200\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/30125790/212157486-bfd08c5d-9337-4b78-be6f-230dc63838ba.png#gh-light-mode-only\" width=\"200\"\u003e\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/veryfi/veryfi-go/veryfi.svg)](https://pkg.go.dev/github.com/veryfi/veryfi-go/veryfi)\n[![Go Report Card](https://goreportcard.com/badge/github.com/veryfi/veryfi-go)](https://goreportcard.com/report/github.com/veryfi/veryfi-go)\n[![Test](https://github.com/veryfi/veryfi-go/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/veryfi/veryfi-go/actions/workflows/test.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\n\n**veryfi-go** is a Go module for communicating with the [Veryfi OCR API](https://veryfi.com/api/).\n\n\n## Table of Contents\n- [Installing](#installing)\n- [Getting Started](#getting-started)\n  - [Obtaining Client ID and user keys](#obtaining-client-id-and-user-keys)\n  - [Setting up the project](#setting-up-the-project)\n  - [Go API Client Library](#go-api-client-library)\n  - [Testing](#testing)\n- [Need Help?](#need-help)\n- [Tutorial](#tutorial)\n\n\n## Installing \n\n\nThis package can be installed by cloning this directory:\n\n```\ngit clone https://github.com/veryfi/veryfi-go.git\n```\n\nor using `go get`:\n```\ngo get github.com/veryfi/veryfi-go\n```\n\n\n## Getting Started\n\n\n### Obtaining Client ID and user keys\n\nIf you don't have an account with Veryfi, please go ahead and register here: [https://hub.veryfi.com/signup/api/](https://hub.veryfi.com/signup/api/)\n\n\n### Setting up the project\n\nFor the ease of developing, a `Makefile` is included for several handy commands. Simply issue `make help` for more informations.\n```\nclean                Remove temporary files and build artifacts\ncover                Run unit tests and open the coverage report\nfmt                  Run gofmt on all files\ngithub-tag           Create and push a tag with the current client version\nhelp                 Print usage information\nlint                 Lint project source files\ntest-integration     Run integration tests\ntest-unit            Run unit tests\nversion              Print the version\n```\n\n\n### Go API Client Library\n\n\nThe **Veryfi** library can be used to communicate with Veryfi API. All available functionality is described here \u003chttps://pkg.go.dev/github.com/veryfi/veryfi-go/veryfi\u003e.\n\nBelow is the sample script using **Veryfi** to OCR and extract data from a document:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/veryfi/veryfi-go/veryfi\"\n\t\"github.com/veryfi/veryfi-go/veryfi/scheme\"\n)\n\nfunc main() {\n\ttimeout, err := time.ParseDuration(\"10s\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tclient, err := veryfi.NewClientV8(\u0026veryfi.Options{\n\t\tClientID: \"YOUR_CLIENT_ID\",\n\t\tUsername: \"YOUR_USERNAME\",\n\t\tAPIKey:   \"YOUR_API_KEY\",\n\t\tHTTP: veryfi.HTTPOptions{\n\t\t\tTimeout: timeout,\n\t\t\tRetry: veryfi.RetryOptions{\n\t\t\t\tCount: 1,\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tresp, err := client.ProcessDocumentURL(scheme.DocumentURLOptions{\n\t\tFileURL: \"YOUR_HOSTED_FILE_URL\",\n\t\tDocumentSharedOptions: scheme.DocumentSharedOptions{\n\t\t\tTags: []string{\"electric\", \"repair\", \"ny\"},\n\t\t},\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Printf(\"%+v\", resp)\n}\n```\n\nA successful response will look something like this:\n```\n\u0026{ABNNumber: AccountNumber: BillToAddress: BillToName: BillToVATNumber: CardNumber: Category: Created:2021-05-20 19:21:38 CurrencyCode:USD Date:2019-02-26 00:00:00 DeliveryDate: Discount:0 DocumentReferenceNumber: DueDate:2019-02-26 ExternalID: ID:23002226 ImgFileName:3947f571-a41b-4b79-abc7-c0d9805c8610.png ImgThumbnailURL:https://scdn.veryfi.com/receipts/3947f571-a41b-4b79-abc7-c0d9805c8610_1_t.png?Expires=1621538559\u0026Signature=BokBYv9jyJcXbCXu49DqxHwRdAWEgG8xfMw7LHujXSCA5y4kGd-QaBDwMzMCgCuM0Ezdrv3lgAZa0Cr8A5DKAzymXxnfdEiV46w~iy1zGPRgx6IkqvllB4bWqHFdwuu88CJarfIjvkcaygcECiFHg3RSKuuN4eGUYDP~fK8ER~Awb9Cr5FpTbTMc9kOfyc~vii2Mikg3TBiTbcdshhjgD2oRI4nFh1fpwRpfHAArIR-ijYAetjFEOQycUiu6WnzWAyEV9RCP9KcrKOnY5eKD-mm5mKuGQGXX1OT2AGw80klF1epx7XppeER9kALF1s8Dq87s8gdnnVsrstEF3~e8Yg__\u0026Key-Pair-Id=APKAJCILBXEJFZF4DCHQ ImgURL:https://scdn.veryfi.com/receipts/3947f571-a41b-4b79-abc7-c0d9805c8610.png?Expires=1621538559\u0026Signature=G7T6n7~Gpr1Pi5rfPRn1GoOeTlKZnVxLbWSZf~svnNpytILXvN9tg7y-Ib39lcifHeM6vjVfm4Pa4k63-ri~SySGFq-RWtF4IjQGM3Hw4~8wHB-sPhorn4JeVd~e~CpaUgFJbGSRnbb1cmBDFdkuBMbLkdC7m5ifwE10kanUU87Q~vpDYLkQINzfylHJk21rwtSPvIiEX8rudLK1F1BGl7TWvx-o7BT~PTCJ-RsA~j4eGuOprDXpt5Achpf-LMUa-iRCpMFupWVOZFPGln8rDqp-TcpryTawTbNlajg0nFDtF1eqBlbfoEycb-ZECtV4KECZtle5T7rBqhGQsmUxNQ__\u0026Key-Pair-Id=APKAJCILBXEJFZF4DCHQ Insurance: InvoiceNumber:   US-001 IsDuplicate:0 LineItems:[] OCRText:\n\nINVOICE                         LOGO\nEast Repair Inc.\n1912 Harvest Lane\nNew York, NY 12210\nBILL TO SHIP TO INVOICE #       US-001\nJohn Smith      John Smith      INVOICE DATE    11/02/2019\n2 Court Square  3787 Pineview Drive\nNew York, NY 12210      Cambridge, MA 12210     P.O.    2312/2019\n        DUE DATE        26/02/2019\n\nQTY     DESCRIPTION     UNIT PRICE      AMOUNT\n\n1       Front and rear brake cables             100.00  100.00\n2 New set of pedal arms         15.00   30.00\n3       Labor 3hrs                      5.00    15.00\n\n        Subtotal        145.00\n        Sales Tax 6.25% 9.06\n        TOTAL   $154.06\n\n        TERMS \u0026 CONDITIONS\nThank you       , Please make checks payable to: East Repair Inc.\n        Payment is due within 15 days\n        John Smith\n OrderDate: PaymentDisplayName:No Payment, PaymentTerms: PaymentType:no_payment, PhoneNumber: PurchaseOrderNumber: Rounding:0 ServiceEndDate: ServiceStartDate: ShipDate: ShipToAddress: ShipToName: Shipping:0 StoreNumber: Subtotal:145 Tax:9.06 TaxLines:[] Tip:0 Total:154.06 TotalWeight: TrackingNumber: Updated:2021-05-20 19:21:39 VATNumber: Vendor:{Address:1912 harvest lane new york, ny 12210 2 court square    3787 pineview drive Category: Email: FaxNumber: Name: PhoneNumber: RawName: VendorLogo: VendorRegNumber: VendorType: Web:} VendorAccountNumber: VendorBankName: VendorBankNumber: VendorBankSwift: VendorIban:}%\n```\n\nFor more examples about different methods to process documents, refer to the [documentation's examples](https://pkg.go.dev/github.com/veryfi/veryfi-go/veryfi#pkg-examples).\n\n\n### Testing\n\n\nTo run unit tests:\n```\nmake test-unit\n```\n\nTo run integration tests, supply your `CLIENT_ID`, `CLIENT_SECRET`, `USERNAME`, and `API_KEY` environment variables in [Makefile](Makefile) and run `make test-integration`:\n```\n.PHONY: test-integration\ntest-integration:  ## Run integration tests\n\tCLIENT_ID=FIXME CLIENT_SECRET=FIXME USERNAME=FIXME API_KEY=FIXME go test -race -cover -run Integration -coverprofile=coverage.out -covermode=atomic ./...\n```\n\n\n## Need Help?\n\nVisit https://docs.veryfi.com/ to access integration guides and usage notes in the Veryfi API Documentation Portal\n\nIf you run into any issue or need help installing or using the library, please contact \u003csupport@veryfi.com\u003e.\n\nIf you found a bug in this library or would like new features added, then open an issue or pull requests against this repo!\n\nTo learn more about Veryfi visit \u003chttps://www.veryfi.com/\u003e.\n\n\n## Tutorial\n\n\nBelow is a introduction to the Go SDK. We're gonna walkthrough a problem and solve it together:\n\n\u003e Let’s say we are faced with a challenge where we have to capture and extract data from thousands (or even millions) of backlogged receipts. We don’t want to do it manually because copying and pasting from files to files takes a lot of time and is often error-prone. Also, different receipts have different forms and styles, finding the meaningful data across a huge pile of files can be a tedious task. What is even better is if we could extract the receipts and see the processing in real-time where the results can be returned almost immediately in seconds, not hours. So now, what is the best way that we can solve this?\n\n[Link to blog post →](https://www.veryfi.com/go/)\n\nIf you prefer a video format, here is the link to our Youtube channel →\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveryfi%2Fveryfi-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fveryfi%2Fveryfi-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveryfi%2Fveryfi-go/lists"}