{
  "openapi": "3.0.1",
  "info": {
    "title": "Citation & URL Verifier for AI Agents: Fake Sources",
    "description": "Check citations, URLs and DOIs before an AI agent trusts them. Finds dead links, fabricated DOIs, title and quote mismatches, and hidden prompt-injection text. Clean page text included. No login.",
    "version": "0.1",
    "x-build-id": "qaAzgAhJC4RDLXBKn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/shafnir~source-guard/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-shafnir-source-guard",
        "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/shafnir~source-guard/runs": {
      "post": {
        "operationId": "runs-sync-shafnir-source-guard",
        "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/shafnir~source-guard/run-sync": {
      "post": {
        "operationId": "run-sync-shafnir-source-guard",
        "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": [
          "items"
        ],
        "properties": {
          "items": {
            "title": "Citations to check",
            "type": "array",
            "description": "Array of sources to verify (1 to 2,000). Each entry is either a string or an object. A string can be a URL, a DOI (10.xxxx/...), an arXiv id (arXiv:2301.00001) or a free-text citation such as 'Smith 2020, Deep nets, Nature'. An object may contain: url, doi, arxiv, title (claimed title), authors (array of names or one string), year (number), quote (exact claimed quote to find on the page), citation (free-text citation) and ref (your own id, echoed back). Give as many claims as you have: every claim you provide is checked."
          },
          "includeContent": {
            "title": "Return clean page text",
            "type": "boolean",
            "description": "Add a safe plain-text or markdown copy of each page (scripts, styles, hidden elements and navigation removed) in the 'content' field. Use it when the agent needs to read the source, not only verify it.",
            "default": false
          },
          "contentFormat": {
            "title": "Content format",
            "enum": [
              "markdown",
              "text"
            ],
            "type": "string",
            "description": "Format of the returned page content.",
            "default": "markdown"
          },
          "includeLinks": {
            "title": "Keep link URLs in content",
            "type": "boolean",
            "description": "Append link targets to link text in markdown content. Off by default to save tokens.",
            "default": false
          },
          "maxContentChars": {
            "title": "Max content characters per page",
            "minimum": 500,
            "maximum": 50000,
            "type": "integer",
            "description": "Truncate returned content to this many characters (500 to 50,000). Quote checks always run on the full page, not on the truncated copy.",
            "default": 6000
          },
          "scanForInjection": {
            "title": "Scan for prompt injection",
            "type": "boolean",
            "description": "Detect hidden or invisible text and instruction-like text aimed at AI agents: CSS-hidden text, white-on-white, off-screen, zero-width and Unicode tag characters, HTML comments, and phrases such as 'ignore previous instructions'.",
            "default": true
          },
          "redactInjectionInContent": {
            "title": "Redact injection text in returned content",
            "type": "boolean",
            "description": "Replace sentences that match injection patterns with a redaction marker in the returned content. Findings still report what was detected.",
            "default": true
          },
          "titleMatchThreshold": {
            "title": "Title match threshold",
            "minimum": 0.3,
            "maximum": 0.99,
            "type": "number",
            "description": "Minimum fuzzy similarity (0.3 to 0.99) between a claimed title and the record or page title to count as a match. 0.8 tolerates subtitles, case and punctuation differences.",
            "default": 0.8
          },
          "respectRobots": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages that robots.txt disallows for SourceGuardBot. Those items return 'unreachable' and are not charged. Scholarly registries (Crossref, DataCite, arXiv, OpenAlex) are API calls and are not affected.",
            "default": true
          },
          "renderJs": {
            "title": "JavaScript rendering",
            "enum": [
              "auto",
              "never",
              "always"
            ],
            "type": "string",
            "description": "Plain HTTP is always tried first. A headless browser is used only when allowed here. Bot-protection challenge pages are never bypassed.",
            "default": "auto"
          },
          "timeoutSecs": {
            "title": "Per-URL timeout (seconds)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "Give up on a URL after this many seconds (5 to 60).",
            "default": 20
          },
          "maxConcurrency": {
            "title": "Parallel checks",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many items to check at the same time (1 to 20).",
            "default": 5
          },
          "contactEmail": {
            "title": "Contact email for Crossref (optional)",
            "type": "string",
            "description": "Crossref asks API clients to identify themselves. If set, the address is sent as the mailto parameter on Crossref requests for faster, more reliable lookups."
          },
          "proxyConfiguration": {
            "title": "Proxy (optional, datacenter only)",
            "type": "object",
            "description": "Off by default. Enable Apify Proxy (datacenter) or provide your own proxy URLs if your sources reject cloud IP addresses. Residential groups are not used. Never used to bypass bot protection."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}