# Japan Legal & IP Data API (`lentic_clockss/japan-legal-search`) Actor

Searches Japanese legal databases via SIP API covering e-Gov law datasets and IP High Court English portal links.

- **URL**: https://apify.com/lentic\_clockss/japan-legal-search.md
- **Developed by:** [kane liu](https://apify.com/lentic_clockss) (community)
- **Categories:** Lead generation, MCP servers
- **Stats:** 1 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Japan Legal Database Search

Search Japanese legal databases programmatically using the SIP API. This Apify Actor provides automated access to Japan's key legal information systems, enabling researchers, legal professionals, and developers to query official Japanese law datasets and intellectual property court records at scale.

### Overview

Japan's legal landscape is vast and complex, spanning thousands of statutes, regulations, and court decisions published across multiple government portals. Accessing this information manually is time-consuming and often requires navigating Japanese-language interfaces. The Japan Legal Database Search Actor solves this problem by providing a unified, keyword-based search interface across two critical Japanese legal data products.

Whether you are conducting Japan legal search for compliance research, monitoring changes in Japanese IP court rulings, or building a Japan law database for your organization, this Actor streamlines the entire data collection process.

### Supported Data Sources

#### e-Gov Law & Justice Dataset (`egov_legal`)

The e-Gov Legal Open Data Catalog is Japan's official electronic government portal for laws and regulations. This source searches the `jp_egov_legal_opendata_catalog` product, which indexes legislative and regulatory documents published through Japan's e-Gov system. It covers statutes, cabinet orders, ministerial ordinances, and other legal instruments maintained by Japanese government agencies.

Use this source when you need to search Japanese legislation, find specific laws by keyword, or build a comprehensive Japan law database covering regulatory and statutory content. The dataset is particularly valuable for compliance teams tracking regulatory changes in Japan and legal researchers studying Japanese legislative history.

#### IP High Court English Links (`ip_court`)

The IP High Court English Portal Links source searches the `jp_ip_high_court_english_links` product, providing access to English-language resources from Japan's Intellectual Property High Court. This specialized court handles appeals in patent, trademark, design, and other IP-related cases, making it one of the most important judicial bodies for international IP practitioners.

This source is essential for anyone conducting Japanese IP court research, monitoring patent litigation outcomes in Japan, or tracking how Japan's IP High Court interprets intellectual property law. The English-language links make this data accessible to international legal teams without requiring Japanese language proficiency.

### Input Configuration

The Actor accepts the following input parameters:

- **keyword** (required, string): The search term to query across selected databases. This is the primary search parameter used to find relevant legal documents and records. For best results with Japan legal search, use specific legal terms, statute numbers, or case-related keywords. Default prefill value is "patent".

- **sources** (optional, array): Select which legal databases to search. Options are `egov_legal` for the e-Gov Law & Justice Dataset and `ip_court` for IP High Court English Links. When left at the default, both sources are searched, giving you comprehensive coverage across Japan's legal information systems.

- **maxResults** (optional, integer): Maximum number of results to retrieve per source. Defaults to 50, with a maximum of 200. Increase this value when you need thorough coverage of a broad search term, or keep it low for targeted queries where only the most relevant results matter.

### Output Format

Results are stored in the default Apify dataset. Each record includes:

- **source**: The source key (`egov_legal` or `ip_court`) identifying which database produced the result.
- **product_id**: The full SIP API product identifier for traceability.
- Additional fields returned by the SIP API for each matching record, which vary by data source.

You can export results in JSON, CSV, XML, or other formats supported by the Apify platform. The structured output makes it straightforward to integrate Japan legal search results into downstream workflows, databases, or analysis pipelines.

### Use Cases

#### Legal Research and Compliance

Law firms and corporate legal departments use this Actor to monitor Japanese regulatory changes, search for specific statutes, and maintain up-to-date Japan law database records. By automating the search process, teams can track legislative developments without manually checking government portals.

#### Intellectual Property Monitoring

IP professionals and patent attorneys rely on the IP High Court English Links source to stay informed about Japanese IP court decisions. Monitoring Japanese IP court rulings is critical for companies with patent portfolios in Japan, as court interpretations directly affect patent validity and enforcement strategies.

#### Academic Research

Researchers studying Japanese law, comparative legal systems, or East Asian IP policy use this Actor to collect structured data from official Japanese legal sources. The ability to search across multiple databases with a single query significantly accelerates the literature review and data collection phases of academic projects.

#### Data Integration and Analytics

Development teams building legal technology products integrate this Actor into their data pipelines to continuously ingest Japanese legal data. The structured JSON output feeds directly into databases, search indexes, and analytics platforms, enabling real-time Japan legal search capabilities within custom applications.

### Setup and Authentication

This Actor requires a valid SIP API key for authentication. Set the `SIP_API_KEY` environment variable in your Apify Actor configuration with your API key. The key is passed to the SIP API via the `X-API-Key` header on every request.

To obtain an API key, register with the SIP data platform and request access to the Japanese legal data products.

### Technical Details

- Built with Python 3.13 and async HTTP requests via httpx for fast, concurrent API calls.
- Uses the Apify SDK v2 for seamless integration with the Apify platform.
- Each data source is queried independently, so a failure in one source does not block results from others.
- HTTP errors and network failures are caught and logged without crashing the Actor, ensuring partial results are always saved.

### Limitations

- Search results depend on the SIP API's indexing and relevance ranking. The Actor passes your keyword directly to the API and returns results as-is.
- The e-Gov dataset primarily contains Japanese-language content. While the IP High Court source provides English links, full-text translations of Japanese statutes are not included.
- API rate limits and quotas are determined by your SIP API subscription tier.

### Keywords

Japan legal search, Japanese law database, Japan law database, Japanese IP court, IP High Court Japan, e-Gov Japan law, Japanese legal research, Japan patent court, Japanese legislation search, SIP API legal data, Japan regulatory compliance, Japanese intellectual property court decisions, Japan legal data scraping, Apify Japan legal Actor


### Use as MCP Tool (AI Agent Integration)

This Actor works as an MCP tool — AI agents (Claude, GPT, Cursor) can discover and run it automatically.

#### Quick setup (Claude Desktop / Cursor / VS Code)

Add to your MCP config:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
````

Then ask your AI: *"Search for patent infringement in Japanese legal databases"*

#### Direct API call

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("lentic_clockss/japan-legal-search").call(
    run_input={"searchTerms": ["patent"], "maxResultsPerSource": 50}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### Other Data API Actors

- [US Federal Law & Regulation API](https://apify.com/lentic_clockss/us-federal-law-search)
- [EU Legal & Procurement Data API](https://apify.com/lentic_clockss/sip-eu-legal-procurement-search)
- [UK Government Data API](https://apify.com/lentic_clockss/uk-data-search)

# Actor input Schema

## `keyword` (type: `string`):

Keyword to search across selected Japanese legal databases.

## `sources` (type: `array`):

Legal databases to search. Leave empty to search all.

## `maxResults` (type: `integer`):

Maximum number of results per source.

## Actor input object example

```json
{
  "keyword": "patent",
  "sources": [
    "egov_legal",
    "ip_court"
  ],
  "maxResults": 50
}
```

# Actor output Schema

## `records` (type: `string`):

Dataset containing search results from Japanese legal databases.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keyword": "patent"
};

// Run the Actor and wait for it to finish
const run = await client.actor("lentic_clockss/japan-legal-search").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "keyword": "patent" }

# Run the Actor and wait for it to finish
run = client.actor("lentic_clockss/japan-legal-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keyword": "patent"
}' |
apify call lentic_clockss/japan-legal-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lentic_clockss/japan-legal-search",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Japan Legal & IP Data API",
        "description": "Searches Japanese legal databases via SIP API covering e-Gov law datasets and IP High Court English portal links.",
        "version": "0.1",
        "x-build-id": "Cva5WmqFk44b4GZcm"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lentic_clockss~japan-legal-search/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lentic_clockss-japan-legal-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/lentic_clockss~japan-legal-search/runs": {
            "post": {
                "operationId": "runs-sync-lentic_clockss-japan-legal-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/lentic_clockss~japan-legal-search/run-sync": {
            "post": {
                "operationId": "run-sync-lentic_clockss-japan-legal-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "keyword"
                ],
                "properties": {
                    "keyword": {
                        "title": "Search Keyword",
                        "type": "string",
                        "description": "Keyword to search across selected Japanese legal databases."
                    },
                    "sources": {
                        "title": "Data Sources",
                        "type": "array",
                        "description": "Legal databases to search. Leave empty to search all.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "egov_legal",
                                "ip_court"
                            ],
                            "enumTitles": [
                                "e-Gov Law & Justice Dataset",
                                "IP High Court English Links"
                            ]
                        },
                        "default": [
                            "egov_legal",
                            "ip_court"
                        ]
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of results per source.",
                        "default": 50
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
