Collecting of ink sacs can prove quite time-consuming. To save time, a squid farm could be made to automatically gather ink sacs for your collection later on. There are two main ways to do it. The first is to dig a funnel underneath the ocean; the second is to make a man-made lake, or find a shallow pre-existing lake.
Squid will spawn in 1 or more blocks of water, no matter whether it's a water source or flowing water. The level of light is not important. However, they will only spawn if their spawning block (the solid block underneath the water) is between Y (vertical) level 46 and 62, inclusive.
Since 1.13.1, they now only spawn in river and ocean biomes.
To have a better spawn rate in your farm you have to eliminate water blocks between 46 and 62 layers in a large area around.
There is a separate mob cap for water mobs (this doesn't include guardians), but the mob cap is shared among all players on a multiplayer server. Thus on a multiplayer server, if any player is near an ocean, it will effectively block output from your squid farm. As with other farms, it is important to kill the squids quickly to allow more to spawn.
Squid can be killed by suffocation (technically, asphyxiation) if they get out of water. They can also be killed by fall damage or by entering lava. Guardians are hostile toward squid and will use lasers to kill them, however catching a Guardian is hard.
Artificial automatic squid farm design
This design takes more time to be built but can achieve a very high ink rate. First of all you should clear as much water as possible out of the river or ocean biome within the render distance of the player. You have to build a chamber between layers 46 and 62, and fill it with water so squid will spawn. To make water push the squid to the bottom you have to place water sources only in the top layer, and also place solid column blocks, as water will only push if it has an adjacent solid block. Underneath the spawning chamber will be a layer of signs that can be traversed by squid but not water. Squid crossing the sign layer will land on a hopper platform, where squid will die either by fall damage or suffocation, and will gather all the resulting ink and send it to chests.
Squids can also spawn in bubble columns, so a downwards column will drag the squid into the magma blocks, which will damage and kill them.
An artificial squid farm in creative mode, made for Minecraft 1.6.1:
One in survival mode, Minecraft 1.8.4, yielding about 4.2 stacks of ink per hour:
Natural squid farm design
This design is easy to build, as it uses the environment to build the farm, although the ink rate is very poor. You have to build layer of signs below a lake or ocean, and dig a hole underneath, so squid will get through it and either die by suffocation or fall damage depending on how deep you dig the hole. The following video shows a natural squid farm built for Minecraft 1.4.7: