### Example API Request URL Source: https://archive.softwareheritage.org/api/1/origin/search/python_limit=2&page_token=gsQFc2NvcmXLP%2FAAAAAAAADEBHNoYTHZKDAwMDA1ZTExNmVmNzMxYWJjYmU1MTU4YzY2N2QxNDkwNWE3OGE3MzA%3D This is an example of a GET request URL to search for software origins. The 'python' part of the URL is a placeholder for the URL pattern to search for, and 'limit=2' specifies the maximum number of results to return. ```http GET https://archive.softwareheritage.org/api/1/origin/search/python/?limit=2&page_token=gsQFc2NvcmXLP%2FAAAAAAAADEBHNoYTHZKDAwMDA1ZTExNmVmNzMxYWJjYmU1MTU4YzY2N2QxNDkwNWE3OGE3MzA%3D ``` -------------------------------- ### GET Origin Visits - Example Request Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/ZhaoYuHanStar/Study/visits This example demonstrates how to make a GET request to the Software Heritage API to retrieve visits for a specific software origin. The URL includes the origin's canonical URL. The 'Accept' header can be used to specify the desired response format. ```HTTP **GET** https://archive.softwareheritage.org/api/1/origin/https://github.com/ZhaoYuHanStar/Study/visits/ ``` -------------------------------- ### GET Request for Origin Visits (Shell) Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/JakobClausen/prisma-examples/visits Example of a GET request to retrieve visit information for a software origin. This endpoint requires the origin URL and returns a list of visits sorted by date. ```shell GET https://archive.softwareheritage.org/api/1/origin/https://github.com/JakobClausen/prisma-examples/visits/ ``` -------------------------------- ### Search Software Origins by URL Pattern (Python Example) Source: https://archive.softwareheritage.org/api/1/origin/search/python_limit=2&page_token=gsQFc2NvcmXLP%2FAAAAAAAADEBHNoYTHZKDAwMDAyMjE4ZGEwMWI5ZmRhZDI0ZjkxYjA0MjMxZWVmM2Q3YTI3Y2E%3D This example demonstrates how to search for software origins using the Software Heritage API, specifically filtering by a URL pattern containing 'python'. It utilizes GET requests and shows how to handle pagination through the 'next' link in the response headers. The response body is parsed to extract relevant origin information. ```python import requests import json base_url = "https://archive.softwareheritage.org/api/1/origin/search/" url_pattern = "python" limit = 2 url = f"{base_url}{url_pattern}/?limit={limit}" try: response = requests.get(url) response.raise_for_status() # Raise an exception for bad status codes data = response.json() total_count = response.headers.get('X-Total-Count') next_page_link = response.headers.get('Link') print(f"Total Origins Found: {total_count}") print("Origins:") for origin in data: print(f" - URL: {origin['url']}") print(f" Origin Visits URL: {origin['origin_visits_url']}") print(f" Metadata Authorities URL: {origin['metadata_authorities_url']}") print(f" Has Visits: {origin['has_visits']}") if next_page_link: print(f"Next Page: {next_page_link}") except requests.exceptions.RequestException as e: print(f"Error making request: {e}") except json.JSONDecodeError: print("Error decoding JSON response.") ``` -------------------------------- ### GET Request to Fetch Origin Visits Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/AngieVMR29/clase1node/visits This example demonstrates how to make a GET request to the Software Heritage API to retrieve visit information for a given software origin. The response is a JSON array of visit objects. ```http **GET** https://archive.softwareheritage.org/api/1/origin/https://github.com/AngieVMR29/clase1node/visits/ ``` -------------------------------- ### Response Body Example - JSON Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/UCSB-CS56-F17/lab02-javadoc-yuhaozhang666-9728627/visits This is an example of the JSON response body when successfully retrieving visit information for a software origin. It includes details like visit date, origin URL, snapshot information, and status. ```json [ { "date": "2024-06-30T00:12:27.404000+00:00", "metadata": {}, "origin": "https://github.com/UCSB-CS56-F17/lab02-javadoc-yuhaozhang666-9728627", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/UCSB-CS56-F17/lab02-javadoc-yuhaozhang666-9728627/visit/2/", "snapshot": "29c6c6c8df430dd82636b21df591e3f029a0f738", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/29c6c6c8df430dd82636b21df591e3f029a0f738/", "status": "full", "type": "git", "visit": 2 }, { "date": "2021-07-13T17:46:08.310000+00:00", "metadata": {}, "origin": "https://github.com/UCSB-CS56-F17/lab02-javadoc-yuhaozhang666-9728627", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/UCSB-CS56-F17/lab02-javadoc-yuhaozhang666-9728627/visit/1/", "snapshot": "29c6c6c8df430dd82636b21df591e3f029a0f738", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/29c6c6c8df430dd82636b21df591e3f029a0f738/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### Get Origin Visits (JSON Response Example) Source: https://archive.softwareheritage.org/api/1/origin/https%3A/code.launchpad.net/~axino/charm-haproxy/trunk/visits This snippet shows an example JSON response from the Software Heritage API when requesting visit information for an origin. The response is an array of visit objects, each containing details like date, status, and URLs. ```JSON [ { "date": "2023-09-29T23:38:40.892000+00:00", "metadata": {}, "origin": "https://code.launchpad.net/~axino/charm-haproxy/trunk", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://code.launchpad.net/~axino/charm-haproxy/trunk/visit/2/", "snapshot": null, "snapshot_url": null, "status": "failed", "type": "bzr", "visit": 2 }, { "date": "2023-04-20T01:29:30.340000+00:00", "metadata": {}, "origin": "https://code.launchpad.net/~axino/charm-haproxy/trunk", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://code.launchpad.net/~axino/charm-haproxy/trunk/visit/1/", "snapshot": null, "snapshot_url": null, "status": "failed", "type": "bzr", "visit": 1 } ] ``` -------------------------------- ### Example JSON Response for Origin Visits Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/pacifinapacific/StyleGAN.pytorch/visits This is an example of the JSON response returned by the Software Heritage API when requesting visits for a software origin. It includes details for each visit, such as its date, associated snapshot, and status. ```JSON [ { "date": "2024-06-23T08:10:44.415000+00:00", "metadata": {}, "origin": "https://github.com/pacifinapacific/StyleGAN.pytorch", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/pacifinapacific/StyleGAN.pytorch/visit/2/", "snapshot": "4035d87e7acf6022fabef38f341016b6f28c1073", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/4035d87e7acf6022fabef38f341016b6f28c1073/", "status": "full", "type": "git", "visit": 2 }, { "date": "2020-11-30T00:17:56.503000+00:00", "metadata": {}, "origin": "https://github.com/pacifinapacific/StyleGAN.pytorch", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/pacifinapacific/StyleGAN.pytorch/visit/1/", "snapshot": "4035d87e7acf6022fabef38f341016b6f28c1073", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/4035d87e7acf6022fabef38f341016b6f28c1073/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### GET Request for Origin Visits (Shell) Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/hkastler/docker-ci-tool-stack/visits Demonstrates how to make a GET request to the Software Heritage API to retrieve visits for a specific software origin. This example uses a simple curl-like structure, assuming the `origin_url` is provided. ```shell GET https://archive.softwareheritage.org/api/1/origin/https://github.com/hkastler/docker-ci-tool-stack/visits/ ``` -------------------------------- ### Example JSON Response for Origin Visits Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/SMask/CustomComponents_UE4/visits This is an example of the JSON response structure received when querying for origin visits. It includes details like visit date, origin information, snapshot data, and status. ```json [ { "date": "2025-09-28T00:43:07.826000+00:00", "metadata": {}, "origin": "https://github.com/SMask/CustomComponents_UE4", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/SMask/CustomComponents_UE4/visit/1/", "snapshot": "d3fc54d9a2d3491311bcfe3b3d903c589068a7b8", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/d3fc54d9a2d3491311bcfe3b3d903c589068a7b8/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### Example Origin Visit Response (JSON) Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/rizwanbinyasin/ExoVisix/visits This is an example of the JSON response received when querying for software origin visits. It details each visit with information such as date, origin URL, snapshot details, status, and visit type. The response is an array of visit objects. ```json [ { "date": "2021-09-29T14:13:47.737000+00:00", "metadata": {}, "origin": "https://github.com/rizwanbinyasin/ExoVisix", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/rizwanbinyasin/ExoVisix/visit/1/", "snapshot": "9994bf3f64d01a56895ff41fc7c40b610ddfec6c", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/9994bf3f64d01a56895ff41fc7c40b610ddfec6c/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### Example JSON Response for Origin Visits (JSON) Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/keccak384/bentobox-subgraph-26/visits This is an example of the JSON response received when querying for software origin visits. It includes details such as the visit date, origin URL, snapshot information, and visit status. ```json [ { "date": "2023-03-25T23:03:07.055000+00:00", "metadata": {}, "origin": "https://github.com/keccak384/bentobox-subgraph-26", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/keccak384/bentobox-subgraph-26/visit/1/", "snapshot": "ffb098ce3bc59f8cce0b3cf96899112457c1b5ca", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/ffb098ce3bc59f8cce0b3cf96899112457c1b5ca/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### Example API Response Body (JSON) Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/hkastler/docker-ci-tool-stack/visits Illustrates the structure of the JSON response when requesting visits for a software origin. Each object represents a visit with details like date, origin, snapshot information, and status. ```json [ { "date": "2021-10-22T14:52:45.348000+00:00", "metadata": {}, "origin": "https://github.com/hkastler/docker-ci-tool-stack", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/hkastler/docker-ci-tool-stack/visit/1/", "snapshot": "1e65d1a7bc9ad0c739ea1f74f532499011018cb8", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/1e65d1a7bc9ad0c739ea1f74f532499011018cb8/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### Example Response Body (JSON) Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/OdatNurd/ruinous-twitch-addons/visits This is an example of the JSON response body returned by the API when requesting visits for a software origin. It contains an array of objects, each detailing a visit with its date, metadata, origin, snapshot information, status, and type. ```JSON [ { "date": "2024-10-03T07:43:10.867000+00:00", "metadata": {}, "origin": "https://github.com/OdatNurd/ruinous-twitch-addons", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/OdatNurd/ruinous-twitch-addons/visit/1/", "snapshot": "03430cfc2857df46ecfc4091ead3316d00f377d8", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/03430cfc2857df46ecfc4091ead3316d00f377d8/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### Example API Response Body (JSON) Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/kathan3/Gym-website/visits This is an example of the JSON response body returned by the API when requesting origin visits. It includes details for each visit, such as its date, origin URL, snapshot information, and status. This structure can be parsed by most programming languages. ```json [ { "date": "2023-09-26T11:19:44.545000+00:00", "metadata": {}, "origin": "https://github.com/kathan3/Gym-website", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/kathan3/Gym-website/visit/1/", "snapshot": "12a93b111a5778b1bb88b6c2f354c0c7f5548d5a", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/12a93b111a5778b1bb88b6c2f354c0c7f5548d5a/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### Software Origin Visits Response Example Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/Rak18Day2/LamDang-to-delete/visits This is an example of the JSON response body returned by the Software Heritage API when requesting origin visits. It includes details such as visit date, origin URL, snapshot information, and visit status. ```json [ { "date": "2025-03-28T12:35:56.669000+00:00", "metadata": {}, "origin": "https://github.com/Rak18Day2/LamDang-to-delete", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/Rak18Day2/LamDang-to-delete/visit/1/", "snapshot": "1a8893e6a86f444e8be8e7bda6cb34fb1735a00e", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/1a8893e6a86f444e8be8e7bda6cb34fb1735a00e/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### GET Origin Visits - Example Response Body Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/ZhaoYuHanStar/Study/visits This is an example of the JSON response body returned by the Software Heritage API when requesting visits for an origin. It contains an array of visit objects, each with detailed information like date, status, and links to related resources. ```JSON [ { "date": "2022-12-27T12:38:04.782000+00:00", "metadata": {}, "origin": "https://github.com/ZhaoYuHanStar/Study", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/ZhaoYuHanStar/Study/visit/1/", "snapshot": "7808fbb0f46c7adfeeddfd89ab21dbae8e7f9c08", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/7808fbb0f46c7adfeeddfd89ab21dbae8e7f9c08/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### Example Origin Visits URL (URL) Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/JakobClausen/prisma-examples/visits A concrete example of a URL used to fetch visits for a specific GitHub repository origin. This demonstrates how the `origin_url` is incorporated into the API request. ```url /api/1/origin/https://github.com/hylang/hy/visits/ ``` -------------------------------- ### Example of API Response Headers Source: https://archive.softwareheritage.org/api/1/origin/search/python_limit=2&page_token=gsQFc2NvcmXLP%2FAAAAAAAADEBHNoYTHZKDAwMDA0NDcxYjExMmNjZTA1ZDUzMTk2MjY2OTUwNTRiZjEzNzQxZjE%3D These are example response headers from the Software Heritage API. 'X-Total-Count' indicates the total number of matching origins, while 'Link' provides a URL for the next page of results. ```http **X-Total-Count** 497027 ``` ```http **Link** ; rel="next" ``` -------------------------------- ### Example JSON Response for Content License Source: https://archive.softwareheritage.org/api/1/content/sha1_git%3Afe95a46679d128ff167b7c55df5d02356c5a1ae1/license This is an example of the JSON response received when querying for content license information. It includes the content URL, a list of detected licenses, and metadata about the identification tool. ```json { "content_url": "https://archive.softwareheritage.org/api/1/content/sha1:dc2830a9e72f23c1dfebef4413003221baa5fb62/", "facts": [ { "license": "GPL-3.0+", "tool": { "configuration": { "command_line": "nomossa " }, "id": 1, "name": "nomos", "version": "3.1.0rc2-31-ga2cbb8c" } } ], "id": "dc2830a9e72f23c1dfebef4413003221baa5fb62" } ``` -------------------------------- ### Example API Response Body Source: https://archive.softwareheritage.org/api/1/origin/search/python_limit=2&page_token=gsQFc2NvcmXLP%2FAAAAAAAADEBHNoYTHZKDAwMDA1ZTExNmVmNzMxYWJjYmU1MTU4YzY2N2QxNDkwNWE3OGE3MzA%3D This is an example of the JSON response body when searching for software origins. It contains an array of origin objects, each with details like 'has_visits', 'metadata_authorities_url', 'origin_visits_url', 'url', and 'visit_types'. ```json [ { "has_visits": true, "metadata_authorities_url": "https://archive.softwareheritage.org/api/1/raw-extrinsic-metadata/swhid/swh:1:ori:00006039192d885e181a5383cd59fe5a200d1d06/authorities/", "origin_visits_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/Lakshmanakumar2407/python-random-quote/visits/", "url": "https://github.com/Lakshmanakumar2407/python-random-quote", "visit_types": [ "git" ] }, { "has_visits": true, "metadata_authorities_url": "https://archive.softwareheritage.org/api/1/raw-extrinsic-metadata/swhid/swh:1:ori:00006134bc19430c0b14ec3085b86ff8d8495827/authorities/", "origin_visits_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/Vanevo00/Python_exercises/visits/", "url": "https://github.com/Vanevo00/Python_exercises", "visit_types": [ "git" ] } ] ``` -------------------------------- ### GET Request for Origin Visits Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/DOGGY-SAINT/2018-final-project/visits This example demonstrates how to make a GET request to the Software Heritage Archive API to retrieve visit information for a specified software origin. The response is a JSON array of visit objects, sorted by date. ```HTTP GET https://archive.softwareheritage.org/api/1/origin/https://github.com/DOGGY-SAINT/2018-final-project/visits/ ``` -------------------------------- ### Example JSON Response for Origin Visits Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/harshasridhar/Hello_World/visits This is an example of the JSON response body returned by the Software Heritage API when requesting origin visits. Each visit object contains details such as the date, origin URL, snapshot information, and status. The response is paginated, and a `Link` header may be present in the response headers to indicate subsequent pages. ```json [ { "date": "2021-04-12T06:02:26.937000+00:00", "metadata": {}, "origin": "https://github.com/harshasridhar/Hello_World", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/harshasridhar/Hello_World/visit/9/", "snapshot": null, "snapshot_url": null, "status": "not_found", "type": "git", "visit": 9 }, { "date": "2020-03-06T11:39:20.051000+00:00", "metadata": {}, "origin": "https://github.com/harshasridhar/Hello_World", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/harshasridhar/Hello_World/visit/8/", "snapshot": null, "snapshot_url": null, "status": "partial", "type": "git", "visit": 8 } ] ``` -------------------------------- ### Example JSON Response for Origin Visits (JSON) Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/JakobClausen/prisma-examples/visits An example JSON response body for a successful request to the origin visits endpoint. It includes details about each visit, such as date, origin, snapshot, and status. ```json [ { "date": "2022-12-03T06:19:15.625000+00:00", "metadata": {}, "origin": "https://github.com/JakobClausen/prisma-examples", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/JakobClausen/prisma-examples/visit/1/", "snapshot": "86c3863fea3a13a64cf33851f815d89b619f835b", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/86c3863fea3a13a64cf33851f815d89b619f835b/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### Filter API Fields using 'fields' Parameter Source: https://archive.softwareheritage.org/api/1/api Illustrates how to use the 'fields' parameter with a GET request to selectively retrieve specific fields from the API response. This example shows how to get 'content', 'directory', and 'revision' fields. ```shell curl https://archive.softwareheritage.org/api/1/stat/counters/?fields=content,directory,revision ``` -------------------------------- ### Example API Response Body (JSON) Source: https://archive.softwareheritage.org/api/1/origin/search/python_limit=2&page_token=gsQFc2NvcmXLP%2FAAAAAAAADEBHNoYTHZKDAwMDA0NDcxYjExMmNjZTA1ZDUzMTk2MjY2OTUwNTRiZjEzNzQxZjE%3D This is an example of the JSON response body when searching for software origins. It contains an array of origin objects, each with details such as 'has_visits', 'metadata_authorities_url', 'origin_visits_url', 'url', and 'visit_types'. ```json [ { "has_visits": true, "metadata_authorities_url": "https://archive.softwareheritage.org/api/1/raw-extrinsic-metadata/swhid/swh:1:ori:000048c592b7d326b7f57a6c44d2dc4c13f6ee41/authorities/", "origin_visits_url": "https://archive.softwareheritage.org/api/1/origin/https://files.pythonhosted.org/packages/source/p/pykwalify/pykwalify-1.7.0.tar.gz/visits/", "url": "https://files.pythonhosted.org/packages/source/p/pykwalify/pykwalify-1.7.0.tar.gz", "visit_types": [ "tarball-directory" ] }, { "has_visits": true, "metadata_authorities_url": "https://archive.softwareheritage.org/api/1/raw-extrinsic-metadata/swhid/swh:1:ori:00005e116ef731abcbe5158c667d14905a78a730/authorities/", "origin_visits_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/PriscaTida/python-formation/visits/", "url": "https://github.com/PriscaTida/python-formation", "visit_types": [ "git" ] } ] ``` -------------------------------- ### GET /api/1/origin/{origin_url}/visits/ Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/daniel417rkcxbl/Affiliate-Marketing---3-Fast-Money-Maker-Achievable-Affiliates/visits Retrieves a list of visits for a given origin URL. The response includes detailed information about each visit. ```APIDOC ## GET /api/1/origin/{origin_url}/visits/ ### Description Retrieves a list of visits for a given origin URL. The response includes detailed information about each visit. ### Method GET ### Endpoint /api/1/origin/{origin_url}/visits/ ### Parameters #### Path Parameters - **origin_url** (string) - Required - The canonical URL of the origin to retrieve visits for. ### Request Example ``` GET /api/1/origin/https://github.com/hylang/hy/visits/ ``` ### Response #### Success Response (200) - **date** (string) - ISO8601/RFC3339 representation of the visit date (in UTC) - **origin** (string) - the origin canonical url - **origin_url** (string) - link to get information about the origin - **snapshot** (string) - the snapshot identifier of the visit (may be null if status is not **full**). - **snapshot_url** (string) - link to /api/1/snapshot/ in order to get information about the snapshot of the visit (may be null if status is not **full**). - **status** (string) - status of the visit (either **full** , **partial** or **ongoing**) - **type** (string) - visit type for the origin - **visit** (number) - the unique identifier of the visit - **id** (number) - the unique identifier of the origin - **origin_visit_url** (string) - link to /api/1/origin/visit/ in order to get information about the visit #### Response Example ```json [ { "date": "2023-10-27T10:00:00Z", "origin": "https://github.com/hylang/hy", "origin_url": "/api/1/origin/https://github.com/hylang/hy/", "snapshot": "abcdef123456", "snapshot_url": "/api/1/snapshot/abcdef123456/", "status": "full", "type": "git", "visit": 12345, "id": 67890, "origin_visit_url": "/api/1/origin/visit/12345/" } ] ``` #### Error Response - **404** - Requested origin cannot be found in the archive. ``` -------------------------------- ### GET Request to Fetch Origin Visits (API) Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/OdatNurd/ruinous-twitch-addons/visits This example demonstrates how to make a GET request to the Software Heritage Archive API to retrieve visit information for a specified software origin. The response will be a JSON array of visit objects, sorted by date. Ensure the Accept header is set to 'application/json' for a JSON response. ```HTTP GET https://archive.softwareheritage.org/api/1/origin/https://github.com/OdatNurd/ruinous-twitch-addons/visits/ HTTP/1.1 Host: archive.softwareheritage.org Accept: application/json ``` -------------------------------- ### Example Origin Visits Response (JSON) Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/LutongZhang/seckill/visits This is an example of the JSON response body when requesting visits for a software origin. Each object in the array represents a single visit and includes details such as the date, origin URL, snapshot information, and visit status. ```json [ { "date": "2023-11-12T10:59:38.600000+00:00", "metadata": {}, "origin": "https://github.com/LutongZhang/seckill", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/LutongZhang/seckill/visit/1/", "snapshot": "1a8893e6a86f444e8be8e7bda6cb34fb1735a00e", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/1a8893e6a86f444e8be8e7bda6cb34fb1735a00e/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### Example Origin Visit Response (JSON) Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/Wolfgang978/weather-dashboard/visits This JSON structure represents a single visit record for a software origin. It includes details like the visit date, origin URL, snapshot information, and status. ```JSON [ { "date": "2024-09-02T09:46:36.547000+00:00", "metadata": {}, "origin": "https://github.com/Wolfgang978/weather-dashboard", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/Wolfgang978/weather-dashboard/visit/1/", "snapshot": "4b97116119600909f835a8773a8ea24e19038fe1", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/4b97116119600909f835a8773a8ea24e19038fe1/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### Example JSON Response for Origin Visits Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/AngieVMR29/clase1node/visits This is an example of the JSON response body when requesting origin visits. Each object in the array represents a visit with details like date, origin URL, snapshot information, and status. ```json [ { "date": "2025-07-24T17:29:32.687000+00:00", "metadata": {}, "origin": "https://github.com/AngieVMR29/clase1node", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/AngieVMR29/clase1node/visit/3/", "snapshot": null, "snapshot_url": null, "status": "not_found", "type": "git", "visit": 3 }, { "date": "2025-06-16T17:38:35.509000+00:00", "metadata": {}, "origin": "https://github.com/AngieVMR29/clase1node", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/AngieVMR29/clase1node/visit/2/", "snapshot": null, "snapshot_url": null, "status": "not_found", "type": "git", "visit": 2 }, { "date": "2025-05-03T01:23:10.685000+00:00", "metadata": {}, "origin": "https://github.com/AngieVMR29/clase1node", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/AngieVMR29/clase1node/visit/1/", "snapshot": null, "snapshot_url": null, "status": "not_found", "type": "git", "visit": 1 } ] ``` -------------------------------- ### JSON Response Example for Origin Visits Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/Monarosaphy/mavitik/visits This is an example of the JSON response body when requesting visit information for a software origin. It includes details like the visit date, origin URL, snapshot information, and visit status. ```json [ { "date": "2024-11-19T12:53:55.237000+00:00", "metadata": {}, "origin": "https://github.com/Monarosaphy/mavitik", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/Monarosaphy/mavitik/visit/1/", "snapshot": "f6e5fbb8a8b55317c9508bb66b251fa5ea8b1803", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/f6e5fbb8a8b55317c9508bb66b251fa5ea8b1803/", "status": "full", "type": "git", "visit": 1 } ] ``` -------------------------------- ### Example Response Body for Origin Visits Source: https://archive.softwareheritage.org/api/1/origin/https%3A/github.com/DOGGY-SAINT/2018-final-project/visits This is an example of the JSON response body when requesting visits for a software origin. Each object in the array represents a single visit with details like date, origin, snapshot information, and status. ```JSON [ { "date": "2020-09-15T12:02:41.657000+00:00", "metadata": {}, "origin": "https://github.com/DOGGY-SAINT/2018-final-project", "origin_visit_url": "https://archive.softwareheritage.org/api/1/origin/https://github.com/DOGGY-SAINT/2018-final-project/visit/1/", "snapshot": "56bc89ca9d375e627028a9b48b8c5c9f8506972c", "snapshot_url": "https://archive.softwareheritage.org/api/1/snapshot/56bc89ca9d375e627028a9b48b8c5c9f8506972c/", "status": "full", "type": "git", "visit": 1 } ] ```