{"id":15115832,"url":"https://github.com/PicartaAI/Picarta-API","last_synced_at":"2025-09-27T21:31:05.583Z","repository":{"id":239298005,"uuid":"799142427","full_name":"PicartaAI/Picarta-API","owner":"PicartaAI","description":"Picarta AI Image Geolocalization API.","archived":false,"fork":false,"pushed_at":"2025-08-17T14:23:17.000Z","size":94,"stargazers_count":46,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-17T15:26:27.192Z","etag":null,"topics":["ai","api","geography","geolocalization","image-search-engine","open-api","osint","osint-tool","visual-place-recognition"],"latest_commit_sha":null,"homepage":"https://picarta.ai/api","language":null,"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/PicartaAI.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-11T09:38:34.000Z","updated_at":"2025-08-17T14:23:20.000Z","dependencies_parsed_at":"2024-05-11T10:41:39.484Z","dependency_job_id":"5767909e-f870-450e-8007-d70a0006e723","html_url":"https://github.com/PicartaAI/Picarta-API","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"e3cf7f1eb68ddf6ba11b340da5c925cf0e1d2b99"},"previous_names":["picartaai/picarta-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PicartaAI/Picarta-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicartaAI%2FPicarta-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicartaAI%2FPicarta-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicartaAI%2FPicarta-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicartaAI%2FPicarta-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PicartaAI","download_url":"https://codeload.github.com/PicartaAI/Picarta-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicartaAI%2FPicarta-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276195571,"owners_count":25601143,"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-09-21T02:00:07.055Z","response_time":72,"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":["ai","api","geography","geolocalization","image-search-engine","open-api","osint","osint-tool","visual-place-recognition"],"created_at":"2024-09-26T01:44:02.180Z","updated_at":"2025-09-27T21:31:05.578Z","avatar_url":"https://github.com/PicartaAI.png","language":null,"readme":"# Picarta-API\n\n[Picarta.ai](https://picarta.ai) Image Geolocalization API 🌍🔍\n\n### Overview\n\nThe Picarta Image Geolocalization [API](https://picarta.ai/api) allows users to localize images and obtain predictions about their geographic location based on their content and/or embedded metadata. Users can provide an image either from a local file or via a URL and receive predictions about the location depicted in the image. The API returns information such as city, province, country, GPS coordinates, and confidence scores for each prediction.\n\n### Authentication\n\nTo access the [API](https://picarta.ai/api), users need to provide an API token in the request headers. Users can obtain an API token by registering on the [Picarta](https://picarta.ai) website.\n\n### Installation\n\nTo install the `picarta` package, use pip:\n\n```bash\npip install picarta\n```\n\n### Usage\n\n#### Request Format\n\nThe API accepts HTTP POST requests with a JSON payload containing the following parameters:\n\n- `TOKEN`: User's API token.\n- `IMAGE`: image path or URL of the image to localize.\n- `TOP_K` (Optional): Number of top predictions to return (default is 10, maximum is 100).\n- `COUNTRY_CODE` (Optional): 2-letter country code to limit search to a specific country (e.g., \"US\", \"FR\", \"DE\").\n- `Center_LATITUDE` (Optional): Latitude of the center of the search area.\n- `Center_LONGITUDE` (Optional): Longitude of the center of the search area.\n- `RADIUS` (Optional): Radius of the search area around the center point in kilometers.\n\n#### Example Request using the `picarta` Package\n\n```python\nfrom picarta import Picarta\n\napi_token = \"YOUR_API_TOKEN\"\nlocalizer = Picarta(api_token)\n\n# Geolocate a local image\nresult = localizer.localize(img_path=\"/path/to/local/image.jpg\")\n\nprint(result)\n\n# Geolocate an image from URL with optional parameters for a specific location search\nresult = localizer.localize(\nimg_path=\"https://upload.wikimedia.org/wikipedia/commons/8/83/San_Gimignano_03.jpg\",\ntop_k=10,\ncountry_code=\"IT\",\ncenter_latitude=43.464, \ncenter_longitude=11.038,\nradius=100)\n\nprint(result)\n\n```\n\n#### Example Request without `picarta` Package\n\n```python\nimport requests\nimport json\nimport base64\n\nurl = \"https://picarta.ai/classify\"\napi_token = \"API_TOKEN\"\ntop_k = 3\nheaders = {\"Content-Type\": \"application/json\"}\n\n# Read the image from a local file or URL\nwith open(\"path/to/local/image.jpg\", \"rb\") as image_file:\n    img_path = base64.b64encode(image_file.read()).decode('utf-8')\n\n# OR  \n\n# img_path = \"https://upload.wikimedia.org/wikipedia/commons/8/83/San_Gimignano_03.jpg\"\n\n# Optional parameters for a specific location search\ncountry_code, center_latitude, center_longitude, radius = None, None, None, None \n\npayload = {\"TOKEN\": api_token,\n           \"IMAGE\": img_path,\n           \"TOP_K\": top_k,\n           \"COUNTRY_CODE\": country_code,\n           \"Center_LATITUDE\": center_latitude,\n           \"Center_LONGITUDE\": center_longitude,\n           \"RADIUS\": radius}\n\nresponse = requests.post(url, headers=headers, json=payload)\n\nif response.status_code == 200:\n    result = response.json()\n    print(result)\nelse:\n    print(\"Request failed with status code:\", response.status_code)\n    print(response.text)\n\n```\n#### Response Format\nThe API returns a JSON object containing geographic location results, including metadata about the image and a dictionary of topk predictions.\n\n#### Example API Response\n\n```json\n{\n  \"ai_country\": \"Fiji\",\n  \"ai_lat\": -10.932661290178117,\n  \"ai_lon\": 173.54167690802137,\n  \"camera_maker\": \"NIKON CORPORATION\",\n  \"camera_model\": \"NIKON D200\",\n  \"city\": \"Ahau\",\n  \"confidence\": 0.7205776784126713,\n  \"province\": \"Rotuma\",\n  \"timestamp\": \"2010:09:21 12:04:46\",\n  \"topk_predictions_dict\": {\n    \"1\": {\n      \"address\": {\"city\": \"Ahau\", \"country\": \"Fiji\", \"province\": \"Rotuma\"},\n      \"confidence\": 0.7205776784126713,\n      \"gps\": [-10.932661290178117, 173.54167690802137]\n    },\n    \"2\": {\n      \"address\": {\"city\": \"Nghi Xuan\", \"country\": \"Vietnam\", \"province\": \"Ha Tinh\"},\n      \"confidence\": 0.13465818962254223,\n      \"gps\": [18.831436938230198, 106.00851919090474]\n    },\n    \"3\": {\n      \"address\": {\"city\": \"Hanga Roa\", \"country\": \"Chile\", \"province\": \"Valparaiso\"},\n      \"confidence\": 0.03465818962254226,\n      \"gps\": [-42.42505486943787, -118.63631306266818]\n    }\n  }\n}\n```\n\n#### Additional Notes\n\n- `topk_predictions_dict` is presented in the second version of the API.\n- `topk_predictions_dict[1]` is equal to province, ai_country, city, ai_lat, ai_lon, and ai_confidence. (It shows the top 1 result, which was in the first version of the API).\n- The API could also return the following values if the EXIF data exists in the images:\n    - `exif_lat`: Latitude from EXIF metadata.\n    - `exif_lon`: Longitude from EXIF metadata.\n    - `exif_country`: Country name from EXIF metadata.\n- For aerial and satellite images, please refer to this repository: [Aerial-Imagery](https://github.com/PicartaAI/Picarta-Aerial-Imagery.git).\n\n### Contact Information\n\nFor any inquiries or assistance, feel free to contact us via:\n\n- Email: [info@picarta.ai](mailto:info@picarta.ai)\n- Discord: [Join our Discord channel](https://discord.gg/g5BAd2UFbs)\n- Share your feedback: [API Feedback Survey](https://forms.gle/JokVe1ZRKP1hjsA49)\n\n","funding_links":[],"categories":["Others","ai"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPicartaAI%2FPicarta-API","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPicartaAI%2FPicarta-API","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPicartaAI%2FPicarta-API/lists"}